I print out the fourth array [3] but get an error


#1

I get the error

Oops, try again. Alas, you should have printed 31, as that is the 4th element!

But 31 is the 4th element of the array, I'm confused.

Replace this line with your code.


#2

Please post your code so we can help you :slight_smile:


#3

Hi Bandit,

Here it is.

// Practice array!

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

console.log = junkData[3];


#4

You need to have your console.log in () so for example:

console.log(junkData[3]) //add those parentheses!

#5

Thank's that has now accepted the code.


#6

Good glad to help! :smiley: And thanks to @bandit you posted your code so we could solve the problem!


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.