Is code comment removal broken?
See original GitHub issueForum thread: https://forum.freecodecamp.org/t/anonymous-functions-right-solutions-doesnt-pass-the-test/491397
Another example, I would expect this code to pass if the comment was removed.
const FCC = "freeCodeCamp"; // Change this line
let fact = "is cool!"; // Change this line
fact = "is awesome!";
console.log(FCC, fact); // Change this line
// var test = 'test';
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Why would removing a comment break a program? - Reddit
Most compilers should strip comments as one of their first steps, so it should usually be incredibly difficult to cause changes to emitted...
Read more >Why is it wrong to comment out code and then gradually ...
Leaving commented code in your code base is a bad practice but that is not what you are doing if you work through...
Read more >As a software engineer, should you always delete commented ...
In my opinion, yes. First, when you comment out code you've removed it. Leaving it clutters the code and increases the time it...
Read more >Commenting code that is removed [closed] - Stack Overflow
Generally, code that is removed should not be commented, precisely because it clutters the codebase (and, why would one comment on something that...
Read more >// Don't remove this comment, or the next line will break. WTF ...
// Comment formatHardDrive = true; It thought that pesky next line was still part of the comment. It wasn't literally formatting the hard...
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 Free
Top 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
Hi there @raditotev I don’t think we want to strip js comments from challenges that use the DOM. Mostly because it increases the possibility of error (strip-comments assumes that it’s being called on code in a single language). Also because there aren’t any comments inside script tags in html challenges (to my knowledge).
I think @nhcarrigan’s approach is best - namely to refactor any tests that use
getUserInput
form just to usecode
. Once that’s done we can stop catering forgetUserInput
entirely.Fixed