Hi, I’m quite new to Coding and thus really new here so I’m sorry if I sound like a major newbie, I just can’t seem to figure out what I’m doing wrong here.
This is my code:
Java !== JavaScript, they are two completely different languages.
The issue with your code is that there is only one element in the array, so when you assign an element to index 4, the three elements between index 0 and 4 are undefined.
The reason there’s only one element in the array is because you haven’t closed the strings for each item. Try this:
let listOfPuppies = ["Shadow", "Mocha", "Max", "Marshmellow"];