Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssougnez/5aa250505a560139c10421f09b5b703f to your computer and use it in GitHub Desktop.
Save ssougnez/5aa250505a560139c10421f09b5b703f to your computer and use it in GitHub Desktop.
let array = [1, 2, 3, 4, 5];
Object.defineProperty(Array.prototype, "foo", {
value: function() { },
enumerable: false
});
for (let index in array) {
let item = array[index];
console.log(item);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment