javaSciptt


#1

am failing to proceed with the lesson there is an error coming out when i try to run my code
// Declare a variable on line 3 called

var myCountry;
var myCountry="Zimbabwe";// myCountry and give it a string value.

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

// Use console.log to print out the first three letters of myCountry.
console.log(0,2 );
myCountry % 8
error is
Oops, try again. It looks like you didn't log the length of myCountry to the console.
Please assist


#2

console.log(myCountry.length); //should fix it
didn't try it do xd


#3

console.log(myCountry.length);

// Use console.log to print out the first three letters of myCountry.
console.log(0,2 ); it is giving this error
error Oops, try again. It looks like you didn't log the first 3 letters of myCountry to the console
..


#4

var myName;
myName="tsitsi";// On line 2, declare a variable myName and give it your name.

console.log(myName.substring("tsitsi"));// On line 4, use console.log to print out the myName variable.

// On line 7, change the value of myName to be just the first 2
myName ="tsi"
tsitsi// letters of your name.
tsitsi="myName";
// On line 9, use console.log to print out the myName variable.
error coming out
Your code doesn't look quite right.


#5

assist am not seeing where am getting wrong


#6

@tmandizvidza , what @fietspomp said about using myCountry.length was correct. You almost got the second part right however, but when logging a part of a string, you would do something like this.

var example = "abcdefg";

console.log(example.substring(0,3));