Array Positions .10 Whaat the heck is wrong?


#1



Array Position 10. Java Script

I get this error " Oops, try again. Alas, you should have printed 31, as that is the 4th element!"


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

console.log= junkData[3];


#2

This line will mess up the JavaScript core function, console.log(). Once we make an assignment, it overwrites the function. You will need to refresh the page to restore the function to normal.

Then, write it like this:

console.log(junkData[3]);

#3

It still not working, getting the same error


#4

Refresh and Reset.

var junkData = ["Eddie Murphy", 49, "peanuts", 31];
console.log(junkData[3]);

#5

Not it gives me an error that says "Type Error: console.log is not a function"


#6

That error message means JavaScript is broken in your browser.

Copy the URL and open a new window with it. Reset and refresh, for good measure. Add and submit code.


#8