Refactor Maths/Factorial for more minimal side effects.#477
Refactor Maths/Factorial for more minimal side effects.#477marsonya merged 4 commits intoTheAlgorithms:masterfrom
Conversation
|
@pomkarnath98 Why to don't merge this PR? |
|
Factorial is already there in the list. So we can only merge if it is not present in the list. Hope you understand. |
It's already but i'm refactor code to minimal side effects. |
|
Ok, we will get back to you soon. |
|
Fixed #503 |
marsonya
left a comment
There was a problem hiding this comment.
Hey @Eji4h, the refactoring looks good. There one thing that needs changing.
Move the (num > 0) if condition to the end.
It's a general practice to validate the input first and then calculate and return the solution if the input passes validation.
Welcome to JavaScript community
Describe your change:
Checklist:
Example:
UserProfile.jsis allowed butuserprofile.js,Userprofile.js,user-Profile.js,userProfile.jsare notFixes: #{$ISSUE_NO}.