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

I don.t understand this this challenge question can someone Please it interpret it to me
This is the challenge question : Add songsHTML to playlistSongs , by using the innerHTML property.

### Your code so far

songsHTML + playlistSongs.innerHTML;

Your browser information:

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

Challenge Information:

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

I’ve solved it but this challenge question isn’t clear at all .

For those who show up after me. The code is:

playlistSongs.innerHTML = songsHTML;

The whole add thing through me for such a loop. got this through trial and error.

6 Likes

We have blurred this solution (with [spoiler][/spoiler] tags) so that users who have not completed this challenge can read the discussion in this thread without giving away the solution.


Add songsHTML to playlistSongs , by using the innerHTML property.

I would probably prefer

Assign songsHTML to the innerHTML property of the playlistSongs element.

1 Like

This wording was incredibly helpful, thank you very much :grin:

1 Like

I made a PR to update the wording.

2 Likes

fun fact , i typed the code exactly as i should , but it was an error , after going through everything again i noticed that i was missing }

I have been wondering;
what is the difference between ;
songsHTML = playlistSongs.innerHTML;
AND
playlistSongs.innerHTML = songsHTML;

I have been trying to make sense out of this for a while with no luck

This question is tricky but, It’s good to warm up the brain a bit :smiley:

Pelo que entendi eles dão as instruções tudo errado e ao contrário. parece que fazem de propósito. é horrível tentar aprender a programar com a lógica
de quem criou esse curso ai

My question is COMPLETELY different than this for Step 19!!! It’s as follows:

Step 19

The map() method is used to iterate through an array and return a new array. It’s helpful when you want to create a new array based on the values of an existing array. For example:

const numbers = [1, 2, 3];
const doubledNumbers = numbers.map((number) => number * 2); // doubledNumbers will be [2, 4, 6]

Notice that the map() method takes a function as an argument. This is called a callback function, which is a function that is passed to another function as an argument. In the example above, the callback function is (number) => number * 2, and it’s run on each element in the numbers array. The map() method then returns a new array with the results.

Pass in a callback function to the map() method. The callback function should take song as a parameter, use the arrow function syntax, and have an empty body.

What do I do for forum help on this?! LOL!!!

Please create your own topic to the challenge step by pressing help button below your challenge editor, it’s appears after attempting Check your code button three times.

1 Like

Ironically, I did the “real dev” method and used AI and Google! lolol…Thank you just the same! Cheers!

1 Like

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