Skip to content
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

Update to Monkey Patch Array example #112

Merged
merged 1 commit into from
Jan 7, 2016

Conversation

HoffsMH
Copy link
Contributor

@HoffsMH HoffsMH commented Jan 7, 2016

This increases the accuracy of the example so that the reader can tell exactly HOW monkey patching will affect this use of a "for .. in" loop

This  increases the accuracy of the example so that the reader can tell exactly HOW monkey patching will affect this use of a "for .. in" loop
@@ -245,7 +245,8 @@ Array.prototype.strangePet = 'snake';

var myPets = ['dog', 'dog', 'rock'];
for(var i in myPets){
console.log(i);
console.log(i); // 0, 1, 2, strangePet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much clearer with both examples and the comments - thanks!

rrgayhart added a commit that referenced this pull request Jan 7, 2016
Update to  Monkey Patch Array example
@rrgayhart rrgayhart merged commit 63b12a2 into turingschool:master Jan 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants