Open chakrit opened 9 years ago
const x = { 'hello': 'world' }; x['hello'] = 'alien'; console.log(x['hello']); // prints 'alien' x = { } // fails silently. console.log(x['hello']); // still prints 'alien'
This (correctly) prints 'alien' but may not be apparent to many people. I think this should be at least noted in the example.
'alien'
// fails silently.
that won't be true of a conforming implementation. it'll throw an error affirmatively.
This (correctly) prints
'alien'
but may not be apparent to many people. I think this should be at least noted in the example.