Lesson 19 I don't know what I'm doing wrong


#1




Replace this line with your code.
if("Jon".length * 2 / (2+1) ===2 )
{
console.log("The answer makes sense!");
}
else
}
console.log("Error Error Error");
{


#2

Your Opening and closing else brackets are the wrong way:

else 
}
console.log("Hello!")
{

You need to switch them around, like so:

else {
    console.log("Hello!")
}

#3

@mtap52190
You are using a closing-curly-bracket-}

else 
}    <<=========== should open a code-block
 console.log("Error Error Error");
{   <<============== should close the code-block

where you would have to use an opening-curly-bracket-{
like

else 
{
 console.log("Error Error Error");
}

#4

I have troubles as well but I do not know what else to do....

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


#5

@lindaortiz,
You did use

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

#6

Thanks a lot.... It makes sense now...


#7

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