Part 10. What's wrong? SOLVED


#1


It is telling me that "console.log" is not a function. Do I need to use "console.log =" ? What is wrong?


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


#2

You're code looks fine, I've tested it myself. Have you tried refreshing or changing browsers?


#3

As @dutchc0de mentioned your code is fine and refreshing the page will probably solve the problem.

Longer Explanation: What mostly causes the problem is the use of console.log = because this means that you reassign console.log with a new value thereby loosing it's function to print stuff to the console so when you fix the code it is no longer able to function correctly. Now when you refresh the page the javaScript gets reloaded and the built-in functions like console.log are set back to their original value which should fix the problem.


#4

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