Skip to content

Instantly share code, notes, and snippets.

@metakeule
Forked from youurayy/test.js
Created June 18, 2012 11:01
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