-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Added FindMax to Maths #831
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
This pull request introduces 1 alert when merging e17e0d0 into 09eebc4 - view on LGTM.com
new alerts:
- 1 for Syntax error
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.
Add jest tests please.
Added FindMax test
This pull request introduces 1 alert when merging 4e34c7d into 2619ab6 - view on LGTM.com
new alerts:
- 1 for Syntax error
Fix the raised errors.
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.
Throw an error, not a string.
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.
Agree with @raklaptudirm. Whenever you know the conditions where your function will fail (I call them nice errors) then throw then instead of handling them yourself (by returning a string) throw an error instead so that the user can handled them according to their business rules.
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.
Agree with @raklaptudirm. Whenever you know the conditions where your function will fail (I call them nice errors) then throw then instead of handling them yourself (by returning a string) throw an error instead so that the user can handled them according to their business rules.
Welcome to JavaScript community
Open in Gitpod know more
Describe your change:
Checklist:
Example:
UserProfile.jsis allowed butuserprofile.js,Userprofile.js,user-Profile.js,userProfile.jsare not