Hi this is tutorials based on the 3 videos (11,12,13). Everything was fine this week but I really struggled with the blog question. I gave the question my best shot but I am still a little confused. It would be great if Mike can give the answer to this blog question. Other than that everything else is great.
Video Walkthrough – Videos 11 – 13
Describe how the spread operator is used to convert a node list of selected elements into an array. Describe why we needed this conversion and how the array was helpful for our first test in the game’s logic.
The spread operate allows an iterable such as nodelist. The spread operator is necessary because it looks at many arguments in an function and it passes the argument and adds it at one time. In other words, the spread operator allows us to turn the nodelist into an iterable array with i elements. The i elements is based off how many i elements you have. We are essentially setting iconArr equal to an emepty array with the spread operator calling each of the icons from the nodelist.