So I finished the JSON 1 assessment (mostly) and this is what I did at first:
I knew I had to combine all of the kitten arrays to get the total number of kittens so I stored each array in a new variable and used the spread operator to combine them. However, I took another look at the instructions in the article and saw I could just nest for...of
loops together to get to the kitten arrays. I edited my code and here’s the final result:
I just wanted a little feedback on how I did and what I can do to improve. Any thoughts?
Link to my code: JSON practice (codepen.io)