Learn Basic String and Array Methods by Building a Music Player - Step 7

Tell us what’s happening:

It is saying I’m not using the new keyword.

Your code so far

const audio = newAudio();

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36

Challenge Information:

Learn Basic String and Array Methods by Building a Music Player - Step 7

This shouldn’t be one word here

Take a closer look at the directions again

Use const to create a variable named audio and set it equal to new Audio()

once you fix that, then it will pass

2 Likes

Thank you
that really helped

1 Like

Just saying this lesson should be improved/revised, instructions don’t give any indication that there’s a space between “new” and “Audio()” unless you copy/paste the snippet.

1 Like

without a space it wouldn’t wrap to a new line

You have a point, I’m just saying it looks a bit confusing, specially for people learning.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.