BUG - Access by offset -


#1

Been trying to the the "Access by offset" lesson and I can not pass the the lesson:

Getting the following error:

TypeError: console.log is not a function. (In 'console.log("JavaScript")', 'console.log' is "JavaScript")

Here is the code that should work but does not:

var languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"];
console.log(languages[2])

The second thing I tried was assigning the array element to a variable first:

var languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"];
var numberThree = languages[2];
console.log("JavaScript");

Both give me the same error, and ideas?


#2

Try to refresh the page then click the save and submit button again. I can't see any problem on your code. so my suggestion is refresh the page

On this block:

I believed that what you are trying to print was the value of variable numberThree
So instead of console.log("JavaScript");, use console.log(numberThree). You declared the variable numberThree that holds languages[2], languages[2] that is equal to "Javascript"


#3

Man I have no idea why I didn't try refreshing. That worked. Thanks gracie017


#5