mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-25 01:00:41 -04:00
fix(curriculum): updated tests and desc for step 8 of music player (#53682)
This commit is contained in:
@@ -7,16 +7,28 @@ dashedName: step-8
|
||||
|
||||
# --description--
|
||||
|
||||
Create a `userData` object that will contain the songs, the current song playing, and the time of the current song.
|
||||
Your music player should keep track of the songs, the current song playing, and the time of the current song. To do this, you will need to create an object to store this information.
|
||||
|
||||
Declare an empty `userData` object using the `let` keyword.
|
||||
Start by using the `let` keyword to declare a new variable called `userData` and assign it an empty object.
|
||||
|
||||
# --hints--
|
||||
|
||||
You should use the `let` keyword to create an empty `userData` object.
|
||||
You should have a variable called `userData`.
|
||||
|
||||
```js
|
||||
assert.match(code, /let\s+userData\s*=\s*\{\s*\};?/)
|
||||
assert.isDefined(userData);
|
||||
```
|
||||
|
||||
You should use the `let` keyword to create the `userData` variable.
|
||||
|
||||
```js
|
||||
assert.match(code, /let\s+userData\s*=/)
|
||||
```
|
||||
|
||||
You should assign an empty object to your `userData` variable.
|
||||
|
||||
```js
|
||||
assert.deepEqual(userData, {});
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user