freeCodeCamp: [beta] Basic JavaScript: Divide one Decimal by Another with JavaScript Test 3 Failing
Challenge Name
Basic JavaScript: Divide one Decimal by Another with JavaScript
Issue Description
Test 3 (The quotient variable should only be assigned once) is not passing valid code.
Browser Information
- Browser Name, Version: Chrome 56.0.2924.87 (Official Build) (32-bit)
- Operating System: Windows 7 Professional, Service Pack 1
- Mobile, Desktop, or Tablet: Desktop
Your Code
var quotient = 4.4 / 2.0; // Fix this line
Screenshot
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (10 by maintainers)
This bug appears to come up when an incorrect answer is submitted first, then it won’t accept the correct answer afterwards. I ran into the same issue with another challenge Basic JavaScript: Escaping Literal Quotes in Strings. In both cases, I reloaded the page, which also reloaded the correct code that had failed the test. After reloading the page, I submitted the code again with no changes, and the test passed.
I encountered this bug as well, I was finally able to work around it by reloading the browser. Doing a reset on my code did not work. Very strange.
@systimotic here is the line of code for this trouble test. Probably has to do with the weird inclusion of the tail code we’ve kinda touched on here.
Ok, so I just tested this again, and I can confirm something very weird is going on.
@BerkeleyTrue mentioning you here, because I think this is an issue in the challenge framework stuff
Steps to reproduce in Firefox
The issue here seems different, but it may be related
All tests fail, and the console output looks like this:
Steps to reproduce in Chrome
Should probably be the same in Safari.
Only the last test will fail.
Common
For both of these, it’s essential that you did the previous challenge before it. If you start on the dividing challenge, it works fine. This is what makes me suspect that something in our code is not cleared out properly.
#12762 may be related, but I’m not certain.
Same issue here on chrome 56.0.2924.87. Confirmed that refreshing the page and submitting the correct answer on the first try allows the test to be completed successfully.
If the correct answer is submitted after an incorrect answer, the test will fail on: The quotient variable should only be assigned once.
Hey,
I also got this error on chrome Version 56.0.2924.87 (64-bit) just now,
After refreshing the page and submitting correct answer first time it worked