solution: Project Euler Problem 19#1174
Conversation
appgurueu
left a comment
There was a problem hiding this comment.
Looks good, but please add some comments.
|
Added the comments and refactored to make more legible |
appgurueu
left a comment
There was a problem hiding this comment.
Turning the terse leap year condition into an if-else construction that takes about twenty times as much vertical space (!) is pretty bad. If anything, the current construction should be made to use a ternary rather than relying on coercion from bool to 0 or 1.
The rename of n to numberOfSundays does indeed improve readability though.
MatheusMuriel
left a comment
There was a problem hiding this comment.
Changed to a ternary if
|
offtopic: @appgurueu i saw that you like Lua, a professor at my university studied in the department that developed the Lua language at PUC-Rio 😄 |
Oh that's nice! |
|
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. |
Describe your change:
Checklist:
Example:
UserProfile.jsis allowed butuserprofile.js,Userprofile.js,user-Profile.js,userProfile.jsare notFixes: #{$ISSUE_NO}.