I do not get what is wrong with it


#1

If ("Jon".length * 2 / (2+1) === "at.length" ) { 
console.log("The answer makes sense!"); 
} 
else {
 console.log ( "Error Error Error") 
}

I do not get what is wrong with it. They say make it true and that is what i did but it keeps running as false


#2

thank you for your response but which line are you referring to


#3

HI Next time please put your code where they aske you to

Then

this line

If ("Jon".length * 2 / (2+1) === "at.length" )

this part

"at.length"

just remove the " " around it


#4

if ("Jon".length * 2 / (2+1) === at.length )
{
console.log("The answer makes sense!");
} else {
console.log ( "Error Error Error")
}

like this?


#5

Yes but you have another error right so instead of at.length just put the number 2

Or you can

do it like that

if ("Jon".length * 2 / (2+1) === "at".length )

#6

ok thank you I did that and it worked. can you explain to me why i was suppose to do that


#7

the .length method give you the length of the value you saved inside a variable

var name = "Wizmarco";
console.log(name.length);
#Output
8

if you do that

console.log(at.length)

it'll say that at isn't define and why the "at" work
because if you do that

console.log("at".length)
#output 
2

which is will make the if condition rigth


#8

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