es6

02. for...of πŸ‘©β€πŸŽ“πŸ‘¨β€πŸŽ“

πŸ—οΈ Implement and Use for…of Loops

Implement the following user story:

  • As a developer, I want to be able to use for...of loops to iterate through data inside objects.

Acceptance Criteria

  • It’s done when I have selected all the inside #songs elements in the html.

  • It’s done when I have iterated through the song collection with a for...of loop and added a class of red to each element.

πŸ’‘ Hint

What part of the object is essential in setting up the iteration of a for...of loop?

πŸ† BONUS

If you have completed this activity, work through the following challenge to further your knowledge:

  • How could you iterate through deeply nested objects?

Use Google or another search engine to research this.


βœ… Solutions

Solutions Click Here