Comment your JavaScript Code passes multi-line comment tests without any code
See original GitHub issueChallenge Name
http://beta.freecodecamp.com/en/challenges/basic-javascript/comment-your-javascript-code
Issue Description
Pressing Run tests without typing any code passes the tests:
- Create a
/*
*/
style comment that contains at least five letters. - Make sure that you close the comment with a
*/
.
I’ve tried running in an incognito window, signed out, and in a different browser and it has the same issue.
Browser Information
- Browser Name, Version: Chrome 55.0.2883.95 (64-bit) (also on Firefox)
- Operating System: OSX EL Capitan
- Mobile, Desktop, or Tablet: Desktop
Screenshot
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Clarifying Code with Javascript Comments | Udacity
Javascript multiline comments, also known as block comments, start with a forward slash followed by an asterisk (/*) and end with an asterisk ......
Read more >JavaScript Comments - W3Schools
JavaScript comments can be used to explain JavaScript code, and to make it ... This example uses a multi-line comment (a comment block)...
Read more >How to do multi line comment in JavaScript - Youth4work
Multiline comments are used for large text descriptions of code or to comment out chunks of code while debugging applications. Comments are ignored...
Read more >Multi line comment Not working | Codecademy
I'm attempting the final part of section 4.4 I entered my code like this: #single line comment =begin this is a multiple line...
Read more >Best practices for writing code comments - Stack Overflow Blog
Writing and then maintaining comments is an expense. · Your compiler doesn't check your comments so there is no way to determine that...
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
The question already asks for at least 5 characters in the comment, which the extra code inserted (
/*fcc*/
) does not have. However the inserted code is matched by the regex/(\\/\\*)[\\w\\W]{5,}(?=\\*\\/)/
at start of the first comment to the end of the last one.If the regex were changed to something like
(\\/\\*)([^\\*\\/]{5,})(?=\\*\\/)
, I think that would solve the problem as it would restrict the characters in between the start and end of the comment from not ending the comment. I think the final test for ending the comment would have to be removed (it’s covered by the second test anyway).This worked for me:
/fiverr/
/*fiverr*/