setPrototypeOf vs obj.__proto__ assignment

John Barton johnjbarton at
Fri Apr 4 10:22:13 PDT 2014

I was surprised to discover that in chrome at least this is valid:
  var obj = {};
  obj.__proto__ = undefined;
but this throws
   Object.setPrototypeOf(obj, undefined);

Is it intended?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list