4 ms·
Interestingly, 2.3 will spit out what you want (but error on the invalid syntax). var Test; (function (Test) { Test[Test["a"] = "RED"] = "a"; })(Te
by dsp1234 9y ago
Interestingly, 2.3 will spit out what you want (but error on the invalid syntax).
var Test;
(function (Test) {
Test[Test["a"] = "RED"] = "a";
})(Test || (Test = {}));
While 2.4 doesn't error out, but omits the inner assignment, thus not allowing the lookup.
var Test;
(function (Test) {
Test["a"] = "RED";
})(Test || (Test = {}));