Remainder challenge needs numbers directly used in modulo
See original GitHub issueChallenge Finding a Remainder in JavaScript has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
// Only change code below this line
var a=11;
var b=3;
var remainder;
var remainder=a % b;
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Program to find remainder without using modulo or % operator
Given two numbers 'num' and 'divisor', find remainder when 'num' is divided by 'divisor'. The use of modulo or % operator is not...
Read more >What is modular arithmetic? (article) - Khan Academy
Visualize modulus with clocks. Observe what happens when we increment numbers by one and then divide them by 3. The remainders start at...
Read more >Why is it if(number % 2 === 0) instead of just (number % 2)??
When we take away the modulo (subtract it from the dividend), the dividend resulting is factorable in terms of the modulus. It can...
Read more >Excel MOD function to get remainder and more - Ablebits
The tutorial shows how to use the MOD function to get remainder in Excel, sum every Nth cell, highlight odd or even numbers,...
Read more >Modular arithmetic/Introduction - Art of Problem Solving
5.1.1 Problem; 5.1.2 Solution; 5.1.3 Why we only need to use remainders ... then we can work directly with those remainders in modulo...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ashekgo thanks for the issue. Your answer will give the correct answer, but because our site is directed to beginner coders, this challenge is more simple than you think. The challenge simply wants you to take the remainder directly
remainder = 11 % 3
.cc/ @FreeCodeCamp/issue-moderators worth changing? I was thinking we modify the
You should use the % operator
test to just look for the modulo character. Then we add another test that uses the current test looking for the modolo character to look for the use of two numbers directly with the modulo symbol.Best to check if the variable remainder has been declared elsewhere or not have the variable remainder be declared by default. On Jun 3, 2016 5:09 PM, “Eric Leung” notifications@github.com wrote: