Unexpected Number


#1

array[list]
var list = [1.2.3.4.5.6.7.8.9.10];
list[0]
list[4]
list[150]


#2

, not .


#3

It no work ionatan it doesnt work


#4

;'s


#5

WHy does it not work


#6

Hey I've pointed out two reasons already! Your turn! :smile:

You can try deleting things until it runs, and then add them back one at a time to see what isn't valid. Then google what you were trying to do with that line.


#7

tried it but still doesnt work


#8

Ok.. how far did you get?
It's really hard to write code without being able to debug it.

Delete one line at a time. The last line that you delete before all errors go away, is in some way invalid.

Ask yourself what that line is supposed to do.

Then google that sentence, like "how do i create a variable in javascript"


#9

no i got it after rewriting it


#10

Sweet.

Hey make sure to compare to your old code so you know what it was though, so that you know what to look for next time.


#11

here it is var Pizza
var Games
var Football
var list = [Pizza, Games, Football]


#12

That's a list of undefined values though, doesn't seem very useful! I mean, I don't know what you're supposed to be doing but.. I don't think that's it!

And you dropped something, here you go: ;;;;


#13

It worked because i had to make a array that had different things


#14

But it's a list of the same value 3 times. Not different!
You created 3 variables, and gave them no value. So they all refer to undefined right?
So your array becomes [undefined, undefined, undefined]

The submission tests are pretty far from perfect. Passing doesn't mean it's working, they often pass incorrect code. I still don't know what you're supposed to do on your exercise, but it seems off to me, that's all I'm saying. But I'm sure you'll figure it out eventually either way so I guess it's fine.


#15

It worked i dont know what to tell you