Exercise 20 AGAIN!


#1

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);
}


#2

@elbenny what's ur whole code??


#3

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


#4

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


#5

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

this is the example @ankurlvv


#6

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.

--EDIT--

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


#7

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

SyntaxError: expected expression, got '%'


#8

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.


#9

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


#10

@elbenny this is true, @lolman is right

Take out {} above and below the code


#11

@elbenny happy coding


#12

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!


#13

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