Exercise 20 AGAIN!


Sorry for the same thread over over over again but i knock my head against a door trying to complete this exercise and i cant get it i know its a algebra thing but i cant get it.
console.log (14 % 3);
console.log (99 % 12);
console.log (11 % 3);


@elbenny what's ur whole code??


thats my code the exercise dont ask for anything else so i put it that way


@elbenny don't put console.log (something ) in parenthesis.


%// Below is an example of printing the remainder of 18/4 using modulo:
// console.log(18 % 4);

this is the example @ankurlvv


I would say take out the " { " and " } " brackets before and after your code. But I'll do some more research and get back to you in a minute.


Final verdict is to take out the opening and closing brackets " { " and " } " before and after your console.log statements.


sure i was checking only i got the same error anyway with the brackets and without the bracket

SyntaxError: expected expression, got '%'


It's three lines of code. That is incredibly hard to mess up so I am assuming this is not your fault. In fact I would suggest that you restart your browser and see if that fixes the issue. Sometimes the link between your browser and the server get mixed up so the browser stops sending your code to the server.


gosh a error on my code already done thx guys sorry for bother all of you


@elbenny this is true, @lolman is right

Take out {} above and below the code


@elbenny happy coding


I tested this out, and I found out that that actually does not change the functionality of the code. It will pass in the lesson, it just doesn't look right, and I'm assuming wouldn't be practical in real world use, and definitely not so in later lessons. Brackets get confusing even when you know where they're suppose to be, so let's not add more!


yeah thats true but i used it to check my error i got a missing % outside of the code so that was the problem in my exercise 20