Added tests & normal function convertion#445
Added tests & normal function convertion#445itsvinayak merged 6 commits intoTheAlgorithms:masterfrom Croustys:master
Conversation
updated code "design" not sure why test fails on such arbitrary things.
|
I wasn't very clear about the arrow function part. I meant don't use a one liner as the aim of the repository is to help beginners. Break the ternary operation into if (n === 0){
return 1
}
return n * factorial(n - 1)Rename the function as And from next time modify the branch you created and don't create a new pull request |
|
On last PR you required a change, which made me unable to edit those files and for some reason couldnt commit new changes to the PR either. Regarding the one liner solution, you could’ve edited my PR with the solution you like, since you just typed it out in your last comment. About adding comments for beginners, probably easier for them to just google the problem and let other websites explain the code’s behaviour rather than reading comments randomly across the code trying to explain which line does what. Also since this should be a beginner friendly code as you mentioned, im not entirely sure why tests are necessary. Thanks 😌 |
Welcome to JavaScript community
Describe your change:
Checklist:
Example:
UserProfile.jsis allowed butuserprofile.js,Userprofile.js,user-Profile.js,userProfile.jsare notFixes: #{$ISSUE_NO}.