Reserved words aren't allowed as properties (but should be).

Skip to first unread message

Aug 27, 2014, 1:51:26 AM8/27/14
In previous versions of JavaScript, the following was illegal:

    var o = {}
    o.delete = 5

But from ECMAScript 5 onwards, the above is now legal. But StratifiedJS rejects it with an error.

If compatibility with old browsers is necessary, it shouldn't be hard for the compiler to detect this and automatically rewrite the above code to this:

    var o = {}
    o["delete"] = 5

This should happen automatically with no effort needed from the programmer.
Reply all
Reply to author
0 new messages