I stuck on #25


#1


Hello, i can't see what I have done wrong here:

// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry ="Lithuania";
var myAge = 16 % 12 = 0;
// Use console.log to print out the length of the variable myCountry.
console.log("Lithuania".length);

// Use console.log to print out the first three letters of myCountry.
console.log("Lithuania".susbtring(0,4) );

"And the answer from above is that myAge % 12 evaluates to 0"


#2

This is incorrect. = is for setting a variable. == is for checking if something is true.

var myAge = 16 % 12 == 0 would work, but that won't be a number. It will say 16/12 has a remainder of 4 which is no equal to 0. So you would end up storing a boolean false to the myAge variable.


#3

var myAge = 16 % 12 = 0; <--- this shouldn't evaluate to 0. it should evaluate to 4;

console.log("Lithuania".susbtring(0,4) ); <---- you have a spelling error for the syntax "substring".

you are also expected to print out three letters. "Lithuania".substring(0,3);


#4

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