FAQ: Lists - Putting it Together

Given the lesson doesn’t seem to have a console. you can use the one built into your browser. f12 is generally the shortcut/key, then click console tab.

otherwise, use google (or whatever search engine you prefer) to figure out how to use browser dev tools

1 Like

I see…Thanks mate. I always see console.log() as part of the solution to many problems and now I know why! I appreciate your time and effort!

hey guys isn’t this list also called an array in JavaScript, also the syntax is the same for a list in python right?

They are sort of the same with some technical differences. For the most part they behave pretty much the same in terms of how we index or slice them. The methods (tools) are slightly different, also, naturally. We can generally do the same operations in both languages, only differently. ES6 has brought more tools to bear that level the playing field.

If someone calls an array a list, we can bear with that little faux pas just knowing they are nearly the same thing.

1 Like

Thanks for clarification @mtf

1 Like

hello
can anyone tell me the data and codes they entered to get the output as for me it simply says ‘sorry this list is not correct’ even though i did according to the instructions given.
if someone could help me out with this, it would be great and i would be extremely thankful.
thanks

Please show us your list, and the item you selected.

did you ever get help with this because im having the exact same problem with this part im doing as it says but its telling me the list isn’t correct. if so can you post what you did so i can see what im doing wrong

LIke mtf said, we can’t help without seeing your code

I’ve typed the following;
comicStrip = [‘Cody sees the trail’, ‘Cody starts the hike’, ‘Cody is halfway’, ‘Cody reaches the finish’]

I keep getting the message saying “Sorry, this list is not correct”
I read earlier in the forum that it might have something to do with a print statement? I don’t remember reading about this and yes, I read everything.

We don’t see anything wrong with your array. What are the instructions asking for?

// Build a list
comicStrip = [‘Codey sees the trail’, ‘Codey starts the hike’, ‘Codey is halfway’, ‘Codey reachs the finish’]
// select the 4th item from the list
// and save it to the variable selection
selection = comicStrip[3]

i can’t find the error but still say that the list is incorrect

1 Like

In the example why are favourite and colour spelt incorrectly?

image
:joy:

1 Like

American vs British grammar, seems the American grammar is used here, which makes sense given Codecademy is based in the United States

1 Like

having the same problem. have you been able to figure it out?

Can you copy paste (or screenshot) your code here? It may offer some clues as to what is causing the problem.
In nehuenfrean089369573 post, the fourth string has a spelling error

'Codey reachs the finish'
// It should be:
`Codey reaches the finish`

Perhaps you may have a similar issue. The strings need to be exactly as specified (including the capitalization) in the instructions.

1 Like

Can someone help me? i’m stuck

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

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

Here are a few issues to consider:

  • You wrote    'Code is halfway'    instead of the string specified in the instructions    'Codey is halfway'

  • comicStrip[3] by itself doesn’t accomplish anything. It selects the 4th item from the list and then does nothing. So, this line is not needed.

  • The instructions specify:

Select the 4th item from the list and save it to the variable selection.

For some reason, you have chosen to the save the item to a variable named myKobe which contradicts the specification in the instructions.

you misspelled ‘reaches’. I had the same problem and literally just spellchecked the words, I had two copying errors. I suppose that is why copy paste is so useful - fewer errors in copying

Ok but what then IS the ‘variable selection’? I cannot find it in the instructions (neither description, format, nor name)

Edit: in the end I used selection = comicStrip[3] as the last line of code to ‘add it to the variable selection’ and it circled the fourth frame, so i guess that worked. my code looked like this and it seems to have worked

// 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
selection = comicStrip[3];
// and save it to the variable selection