Stuck on level 19.Math


could someone take a screenshot of their finished script for part 19.Math, I checked the hint and fixed what they asked me to and it still won't let me through to the next section. Thanks :confused:


I can post the code I've used, but it is more usefull for you to post your code so we can see what went wrong. Maybe you can do that first and we can give you hints or the final code.


• Give hints, tips and tricks.

• Give the correct code with no explanation because you can't be bothered.
• Post pictures of code as opposed to text, it's annoying.


I think it may be a ;(semi colon) on you first line.
Saying that I've only just done that bit myself so I'm not 100%


Simple problem, just look at your first line, the the number/variable after the three equal signs.
And do not forget the if and else statement and their conditions.


Please help


I need help with this one....

It seems as though every answer that I put in is wrong:

confirm("Jon".length * 2/(2+1) === 2);
console.log("The answer is not 3!");

console.log("Error Error Error");

Can I please get some help????


confirm("Jon".length * 2/(2+1) === 2); //No semi-colon at end of if statements
if //If statement should be "if(condition) { ... }" as posted below.

That should actually look like this:

if ("Jon".length * 2/(2+1) === 2) {
   //Code here!


thank you @lolman, however, the statement is still not evaluating to true...


if("Jon".length * 2/(2+1) === 2)
console.log("The answer is equal to 3!");
console.log("Error Error Error");


There's nothing wrong with your code. Try refreshing your page and seeing if that fixes your error.


Apparently there is something wrong with it. I refreshed the page, and it still says there's something wrong with the syntax...


Honestly, there is nothing wrong with your code in terms of syntax. I'd suggest you check the console.log statement and make sure it matches the instructions exactly.


You were right, I reset the code and typed it in this way, and then I passed the exercise:

if ("Jon".length * 2 / (2+1) === 2)
console.log("The answer makes sense!");
console.log("The condition is false");

Thanks, @lolman


I refreshed and removed the semicolon in error error error and that seemed to work for me


A post was split to a new topic: Sa ne marche toujours pas