10. Array positions error


#1

what is the problem ???



Replace this line with your code.


#2

@designsolver51917 that is way off... I dont see any problem there.[probably codecademy's console bug...]

EDIT
Yea the error is confusing i have same exact thing and passing:

var junkData = ["Eddie Murphy", 49, "peanuts", 31];


 console.log(junkData[3])

What browser are you using?


#3

@designsolver51917
Have you used console.log = at all while doing this exercise? seems you've overwritten what console.log does

refresh the page and resubmit, that should fix it

^_^


#4

@benjnev by the picture he showed us he didnt use console.log = , instead console.log();


#5

Try separating them one tab.

var junkData["Eddie Murphy", 49, "peanuts", 31];

console.log(junkData[3]);

Or maybe this really is a Codecademy console bug. If it is, contact them.

I hope this helps!
If it does, click the "Solved" button below this reply.


#6

Notice the "have you used it AT ALL during the exercise."

That means they could have then changed it after realising that they shouldn't be using console.log =

:slight_smile:


#7

Oh ok sorry... But one question. Why does it matter if he used

console.log = "something"

and then changed it to

console.log("Something")

I mean it shouldnt matter what you did previously with a normal compiler.. Something odd with Codecademy Compiler :confused: ?


#8

In this instance it shouldn't be to bad,

But when you're trying to do something like this look what happens.

https://repl.it/CRMq

Where as if I change some bits around to be correct so console.log() instead of console.log = this happens:

https://repl.it/CRMq/1

See what I mean?


#9

Yea @benjnev interesting error :laughing:(Never thought i would say that..) .


#10