Array called list


#1

Create an array called list in the editor. It can contain any data you want! Make sure it has at least three elements.

var vec = ["candy", "chocolate", 3];
console.log(vec);

Why not work it?


#2

I haven't gone to look at the exercise, but if it is really asking you to create an array called list, you have not done that yet.


#3

But, what is different at the array called list?


#4

There is a code checker running, and one of its checks is likely to see if you have made an array with the name list.


#5

If you give me the link to the exercise, I'll have a look at it.


#6

https://www.codecademy.com/courses/javascript-beginner-en-9Sgpi/0/1?curriculum_id=506324b3a7dffd00020bf661

Is the first lesson from array and objects in js....I wrote the array called list in many ways but it gives me error: Oops, try again. Did you remember to declare an array called list?


#7

var list = ["candy", "chocolate", 3];

That works for me, did you try that already?


#8

Yes, I trying but don't work and I don't know why!


#9

Could you give me a screen shot of your code and the error that you are seeing?


#10

Look:


#11

You still have

var vec

change that to

var list

#12

Now it works. Thank you very much!