HELP SOLVING THE Math 19


#1

Hi there! I'm stuck in the Math 19 and Im not quite sure what I have to do so the code can work.

Original Code:

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

what I was trying to do:
if ("Jon".length * 2 / (2+1) === ){
{
console.log("The answer makes sense!");{
}
else {
console.log("Error Error Error);
}

If someone can help me try to figure this out please.
thanks :slight_smile:


#2

Hi @thepclg

Please see the code sample below. Just a couple of syntax gremlins and hopefully this will all make sense :wink:

if ("Jon".length * 2 / (2+1) == 2 )// one too many open parens & this statement needs to evaluate to something EG: == x  {
{
     console.log("The answer makes sense!"); //don't need thi paren here either{
}
else 
{
     console.log("Error Error Error"); //missing the double quote to close out the string literal
}

#3

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