Skip to content

Instantly share code, notes, and snippets.

@metakeule
Forked from youurayy/test.js
Created June 18, 2012 11:01
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 metakeule/2947883 to your computer and use it in GitHub Desktop.
Save metakeule/2947883 to your computer and use it in GitHub Desktop.
Testing overloadability of native Object members
var ps = [
'__defineGetter__', '__defineSetter__', 'valueOf',
'__lookupGetter__', '__lookupSetter__',
'constructor', 'hasOwnProperty',
'isPrototypeOf', 'propertyIsEnumerable',
'toLocaleString', 'toString' ];
var o = {};
for(var i = 0; i < ps.length; i++)
o[ps[i]] = 'testing ' + i;
for(var i = 0; i < ps.length; i++)
console.log(o[ps[i]]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment