-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
WhileLoopFactorial: Optimize and add tests #992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was previously an unnecessary check for if the number was 0 or 1.
The test was not present previously.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably prefer a for
-loop but this is fine. Thanks for adding tests in particular. @raklaptudirm do we have a guideline on authorship documented as comments in code files? I believe it should be kept only in the Git history and the comment should be removed entirely.
@raklaptudirm space before function parentheses is bad style IMO, can't standard be configured differently? |
@appgurueu No standard is a style that can't be configured. That is basically the reason we use it, as it is easy of beginners. Imo, as long a consistent style is being maintained the details don't matter. |
Also, we do not have a guideline for inline author annotations. |
@merelymyself Do this: $ npm install standard --global
$ standard --fix |
…ard, so I just used the online verifier at https://standardjs.com/demo.html
Welcome to the JavaScript community
Describe your change:
Checklist:
Example:
UserProfile.js
is allowed butuserprofile.js
,Userprofile.js
,user-Profile.js
,userProfile.js
are notFixes: #{$ISSUE_NO}
.