FAQ: Lists - Putting it Together

It works! Thank you. I should have only update the page in browser. Always forget the simplest way. Just reset.

1 Like

this is what i came up with and it worked. my first mistake was not entering the code onder the isntructions like the first piece of code goes under ‘// Build a list’ the other code goes under ‘//select the 4th item from the list’ and so on… you get the picture… for me that was keeping me back from running the code…

// Build a list
comicStrip = [‘Codey sees the trail’, ‘Codey starts the hike’, ‘Codey is halfway’, ‘Codey reaches the finish’]

// select the 4th item from the list
comicStrip[3]
// and save it to the variable selection
selection = comicStrip[3]

It should look like this…

// select the 4th item from the list
// and save it to the variable `selection`

selection = comicStrip[3]
1 Like

I was having the same issue as a number of other people here. I realize the problem I was having is that I was trying to be too smart and was deleting the comments. If you leave the comments that are there and type your code after the relevant comments, you won’t have any issues. (Though it would be ideal if that didn’t cause an error.)