Add demo for Array.prototypes Fixes #417 and #416#439
Conversation
schalkneethling
left a comment
There was a problem hiding this comment.
Couple of items that needs attention in Array.some(), but this is looking good. Thanks @maddhruv
|
|
||
| var even = function(element, index, array) { | ||
| // checks whether any element is even | ||
| return element % 2 == 0; |
| <pre> | ||
| <code id='static-js'>var array = [1, 2, 3, 4, 5]; | ||
|
|
||
| var even = function(element, index, array) { |
There was a problem hiding this comment.
You are not using index nor array inside the function so, no need to declare them as parameters.
| <code id='static-js'>var array = [1, 2, 3, 4, 5]; | ||
|
|
||
| var even = function(element, index, array) { | ||
| // checks whether any element is even |
There was a problem hiding this comment.
// checks whether an element is even
|
Thanks @maddhruv for the update. Not sure how familiar you are with Git. Would you be ok with squashing(rebasing) your commits down to a single commit? |
|
@maddhruv No worries, I see you worked directly on your master branch. This might be a little prickly and I do not want you to loose your work. In future, please create a feature branch instead of working directly on master. https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow |
|
Thanks, @schalkneethling for your support. I actually didn't rebase |
@schalkneethling , I just use the "Squash and merge" big green button, so contributors don't have to squash commits. Is there a reason I shouldn't be doing this? |
Nope. If the person is used to doing it with Git its a quick thing. Also, trying to guide people in the direction of rebasing once they have made final changes and expect a r+ Definitely not something that should block anyone from using the Github squash and merge and holding up a PR |
No description provided.