Tell us what’s happening:
Set the remainder equal to the remainder of 11 divided by 3 using the remainder (%) operator.
HOW?
Your code so far
const remainder = 0;
var remainder ...?
### Your browser information:
Set the remainder equal to the remainder of 11 divided by 3 using the remainder (%) operator.
HOW?
const remainder = 0;
var remainder ...?
### Your browser information:
Please post a link to the Step and show us what you have tried.
Don’t forget to show us what code you have tried.
That code is over there /\
Can you explain why you think ...?
is a correct solution to try then?
Because I didn’t understand anything there and wanted to show you exactly where the problem is.
Ok. So you should actually try to solve the Step or specifically say what about the instructions you don’t understand.
Can you show the sentence I don’t understand step by step?
Set the remainder equal to the remainder of 11 divided by 3 using the remainder (%) operator.
No, I cannot solve the problem for you. That is against the rules.
Can you say what about the Step you did not understand?
The remainder operator
%
gives the remainder of the division of two numbers.Example
5 % 2 = 1 5 / 2 = 2 remainder 1 2 * 2 = 4 5 - 4 = 1
Usage
In mathematics, a number can be checked to be even or odd by checking the remainder of the division of the number by2
. Even numbers have a remainder of0
, while odd numbers a remainder of1
.17 % 2 = 1 48 % 2 = 0
Note: The remainder operator is sometimes incorrectly referred to as the modulus operator. It is very similar to modulus, but does not work properly with negative numbers.
Is that how you write?
const remainder = 11 % 2 = 2remainder;
The tests should tell you if that is valid or not.
I suspect not, as that is invalid syntax.
Why can’t you help me?
I’m helpless without help.
I can help you. I cannot write the answer for you.
I really appreciate you helping me so far.
I don’t recall any previous steps showing using two = in the same line. I also don’t recall anything showing something like 2remainder
The example in this exercise is showing the math relationship.
I can see how the examples in the instructions could be confusing.
All it is, is this:
The % operator just returns the remainder of dividing two numbers.
If you divide 5 by 2, you get 2 with a remainder of 1, right?
So, 5 % 2 = 1.
If you divide 17 by 2, that’s equal to 8 with a remainder of 1.
So, 17 % 2 = 1 also.
And if you divide 48 by 2, that’s equal to 24. Since 2 goes in evenly, there’s no remainder.
So, 48 % 2 = 0.
Is that a little clearer? Your code was very close, but it looks like you were getting confused by the unclear example.