Skip to content

Instantly share code, notes, and snippets.

@endel
Created November 23, 2012 16:22
Show Gist options
  • Select an option

  • Save endel/4136334 to your computer and use it in GitHub Desktop.

Select an option

Save endel/4136334 to your computer and use it in GitHub Desktop.
Dangerous JavaScript
Array.prototype.doSomething = function() {}
var arr = ["10", "20", "30"];
for (key in arr) {
console.log(key, arr[key])
}
// 0 10
// 1 20
// 2 30
// doSomething function () {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment