26. console.log is not a function?


#1


Sorry if this is a redundant post. I'm having problems with exercise 26 but looking through the past topics I'm not seeing a fix. I keep getting an error stating "TypeError: console.log is not a function" Am I missing punctuation somewhere?


<Below this line, add a link to the EXACT exercise that you are stuck at.>
// On line 2, declare a variable myName and give it your name.
var myName = "Caitlin";
// On line 4, use console.log to print out the myName variable.
console.log(myName);
// On line 7, change the value of myName to be just the first 2 
// letters of your name.
myName = myName.substring(0,2);
// On line 9, use console.log to print out the myName variable.
console.log(myName);


#2

Update: Backing out of the exercise and then trying to submit again seemed to fix the issue. Didn't make any changes to the code and then it submitted just find. Maybe it was caused by the browser? Not sure. Would be great to know what exactly causes this.


#3

Your code works fine on mine screen but you just have to erase


#4

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