Created
January 19, 2012 09:17
-
-
Save youurayy/1638914 to your computer and use it in GitHub Desktop.
Testing overloadability of native Object members
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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