0

I saw in old answer in the stackoverflow and across the Web that 'undefined' can be assigned. I remember that is can be assigned. But I think not more.

So when I open console and try to do undefined = 'value'; console.log (undefined); I get undefined as the output.

Are browsers have a new handling about undefined?

Shlomi Levi
  • 3,114
  • 1
  • 23
  • 35
  • Could you provide a reference/link to the answer you are referring to? – Igor Feb 21 '17 at 18:51
  • From the first answer of the possible duplicate: "ECMAScript 5 changed this behavior, and now the property is not writable nor configurable. Therefore, assignments to undefined will be ignored in non-strict mode, and will throw an exception is strict mode." –  Feb 21 '17 at 18:52
  • here: http://jsbin.com/behapod/1/edit?js,console – Shlomi Levi Feb 21 '17 at 19:14

1 Answers1

2

In strict mode, undefined can't be redefined.

Daniel A. White
  • 187,200
  • 47
  • 362
  • 445