Whats wrong here

Tell us what’s happening:
Describe your issue in detail here. pls can you tell me whats wrong here?https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/finding-a-remainder-in-javascript

Your code so far


// Only change code below this line
11 % 3;
var remainder = 2;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36

Challenge: Finding a Remainder in JavaScript

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

You’re trying to do the computer’s job. 11 % 3 is 2, you don’t need to figure out the answer, set the variable remainder to that calculation

2 Likes

Thanks @DanCouper never knew I was doing it the wrong way…

So the part 11 % 3 is called an evaluation, as we’re asking the computer to evaluate a final result. But when that evaluation is done, it returns some value. By placing the evaluation on the right side of the =, we assign that returned value to our variable.

Thanks @snowmonkey your explanation came handy, well appreciated…

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.