Finding a Remainder in JavaScript 2

Finding a Remainder in JavaScript 2
0

#1

Tell us what’s happening:
ive tried evrything

Your code so far

// Only change code below this line

var remainder ;
**Your browser information:**

Your Browser User Agent is: ```Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0```.

**Link to the challenge:**
https://www.freecodecamp.org/challenges/finding-a-remainder-in-javascript

#2

The code you shared does nothing except initialize an empty remainder variable. Without knowing what solution(s) you have actually tried and thought would work, we can’t help.


#3
var Remainder = 11 % 3 = 2
var Remainder = 11 / 3 =2
etc

#4

% is an operator the same way that + and - are operators.
If the instructions told you to “Set someVar equal to the sum of 2 and 3” you wouldn’t do

var someVar = 2 + 3 = 5;

You would just do

var someVar = 2 + 3;

#5

Tell us what’s happening:

Your code so far


// Only change code below this line

var remainder;
var x = 11;
var y = 3;
var z = x % y;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.

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


#6

Set remainder equal to the remainder of 11 divided by 3 using the remainder (%) operator.

What are x, y and z? As the OP did earlier this year, you have an undefined variable remainder, you haven’t set the value of it to anything


#7

thank you i corrected my mistake i suppose to
var remainder = 11 % 3;
something like that