On 25. More Variable Practice


I wrote this following code but getting TypeError: console.log is not a function

please help

// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry = "India";

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

// Use console.log to print out the first three letters of myCountry.


just like length, sub string should be inside the brackets (()) of console.log, since you want to log part of the string to the console.


Instead of this line:

write this line:


thanx buddy, worked as charm


thank you for pointing out error.:+1: