-
Notifications
You must be signed in to change notification settings - Fork 508
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
Add demo for Array.prototypes Fixes #417 and #416 #439
Conversation
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.
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; |
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.
Please use ===
here.
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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.