Finding a Remainder in JavaScript

Finding a Remainder in JavaScript
0.0 0


Tell us what’s happening:

what’s wrong with this?

Your code so far

// Only change code below this line

var 8 % 3 = 2 (8 is even);```
**Your browser information:**

Your Browser User Agent is: ```Mozilla/5.0 (Windows NT 6.3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36```.

**Link to the challenge:**

var 8 % 3 = 2

This is invalid javascript. On the left of = we have the variable name and on the right we have the value like this:

var myVar = 5 + 6;

You don’t need to specift the result (2). It’s calculated in your 8 % 3 expression. All you need to do is assign that to a variable named remainder.


Thank you for contributing, can you give an example please (I am new to coding so I known nothing)


I still can’t get this, could you campers kindly explain this to me in detail?


Whoops sorry I missed your followup question. What is the part that you don’t get? There are 15 challenges before this one that you work with variables. This is no different. If you did the rest of them you should be able to do this easily.


Thank you for your concern @TheGallerry, have already figured it out.
Happy codding