10/13


#1

var junkData = ["Eddie Murphy", 49, "peanuts", 31];
var junkData[3];
{
console.log=(junkData[3])
};
i dont get whats wrong in this?
it says SyntaxError: missing before statement


#2

Please give us the rigth lesson.

Explain me what you wanna do:

var junkData = ["Eddie Murphy", 49, "peanuts", 31]; // create an Array
var junkData[3]; // ??
{ // why curlybrackets
    console.log=(junkData[3]) // this could work if you delete the = 
}; // why curlybrackets

#3

thanks a mil for your help1 :smile: but its still not working!

So we just need to know the array name (here, it is junkData)
Print out the fourth element of the array.

  1. Start with figuring out how to express what the fourth element in the array is.

  2. Then use console.log() to print things out!


#4
var junkData = ["Eddie Murphy", 49, "peanuts", 31]; // create an Array
console.log(junkData[3]); // print it out

Thats all :smile: