Finding a Remainder in JavaScript help me pease

Tell us what’s happening:

Your code so far


// Only change code below this line

var remainder;
var %;
remainder = 2;
 % = remainder;




Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:65.0) Gecko/20100101 Firefox/65.0.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/finding-a-remainder-in-javascript

So it explains the remainder operator, % (which i always called the modulus but…), and how it is used to return any remainder. So

321 % 100 = ?

tried it , not still working

var remainder = ••••• % •••••;

What do you suppose they want for the two missing values?

var %;

% is not a valid variable name, it is an operator. It can only do one thing, it’s operation.

% = remainder

You did it again, remember what i said about the left-hand side? You can not assign values to operators, they are what they are and you can not change their meaning.

You can’t do this (luckily).

var +;
var -;
+ = -;

Example of assignments of operations.

var valueOfAddition = 5 + 5;
var valueOfSubtraction = 10 - 5;
var valueOfRemainder = 10 % 2;

Side note: There is some unfortunate use of the = sign in the assignment text which I would like to change, possibly to the word is. At this point in the learning process, i think we should avoid using = to mean equal to.

@snowmonkey, I thought the same thing at first:

1 Like