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

Tell us what’s happening:

I’m still confused about this material, should this provide setAttribute() or what?

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

  if (userData?.songs.length === 0) {
    const resetButton = document.createElement("button");
    const resetText = document.createTextNode("Reset Playlist");
    resetButton

  }

// User Editable Region

Your browser information:

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

Challenge Information:

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

Hi @mochamadglh

For example, element.id would set an id attribute, and element.ariaLabel would set an aria-label attribute. Both of them accept their values as a string.

For this step you are setting the id and aria-Label properties for resetButton

The syntax is similar to setting the .innerText property from the role playing game.

Happy coding

Wow, thank you very much sir, I hope good people like you will always be given a smooth life

1 Like