-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Optimized code #951
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
Optimized code #951
Conversation
Both variables are already declared before the "if" statement. Do we still need to declare them inside again? |
Remove the previous declarations. |
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.
Format your code with standard.js
Nothing is changing even after formatting with standardjs. |
Then do that. |
@utsav0 Run |
I did it many times. It's still the same code so nothing to commit. |
What command are you running? |
standard --fix
…On Mon, 28 Mar, 2022, 11:41 PM Rak Laptudirm, ***@***.***> wrote:
What command are you running?
—
Reply to this email directly, view it on GitHub
<#951 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWV6TE2EPYAHL4XFHDG2IITVCHY4LANCNFSM5RXABLIA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Are you doing it in the code directory? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
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.
LGTM. Could be even shorter as let lcm = Math.max(...)
but is fine either way.
@utsav0 You need to style your code. |
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.
Minor formatting issue, please fix.
Co-authored-by: merelymyself <[email protected]>
@raklaptudirm after your latest change, the PR contains effectively no content anymore as the |
I'm doing it in the root directory of the project.
…On Tue, 29 Mar, 2022, 12:14 PM Rak Laptudirm, ***@***.***> wrote:
Are you doing it in the code directory?
—
Reply to this email directly, view it on GitHub
<#951 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWV6TE67WZC4AQNIY4CG463VCKRDNANCNFSM5RXABLIA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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}
.