Really Weird Error Exercise 25


#1

Good morning guys,

I don't know what's going on with the code, but it seems to want to use "log" in console.log as a variable. Anyone see my mistake?

Exercise 25

It looks like 'log' on line 6 was not defined before it was used. This means either you need to define it, 'log' is spelled incorrectly or you need quotes around 'log'.

// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry = "United States of America",

// Use console.log to print out the length of the variable myCountry.
console.log( myCountry.length);

// Use console.log to print out the first three letters of myCountry.
console.log(myCountry.substring(0,3));

#2

Here.

You used a comma instead of a semi-colon. ( ; )

Hope this helps! :wink:


#3

Geez I'm an idiot.... Thanks!


#4

Keep at it.

Have fun coding! :wink:


#5

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