I am doing this exercise with arrays but it does not let me pass this task. What I did print out the correct answer, but the program tell me I did something wrong. Here is what needs to be done:

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!

This is what I did:

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


The so-called console.log() method
needs a so-called argument
which it will then Display in the =pre-view= screen.

In our case the argument would be junkData[3]
thus you would write:
console.log( junkData [3] );

the equal-sign-= is used as a so-called assignment-operator
leading to, you trying to assign log(junkData[3]) to the console object !!!

if the console.log()-Method is used in a HTML-environment
your output would be presented into the console of the Browser debugger.


I did it just the same, but see the screen shot it saying something is wrong again.

You are still using

console.log = ( junkData[3] );

change into

console.log( junkData[3] );