Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Firefox give a syntax error, class is a reserved identifier?

Opening a file named index.html with the following code on Firefox 43 renders the following error:

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title></title>
    <script>
    "use strict";
    class RangeIterator {}
    </script>
    </head>
    <body>
    </body>
    </html>

I see the following error in the console:

SyntaxError: class is a reserved identifier

Any idea why I'm getting that error?

like image 884
btelles Avatar asked Dec 22 '15 05:12

btelles


1 Answers

Classes aren't supported in Firefox version < 45 according to this

like image 148
Joseph Young Avatar answered Nov 15 '22 21:11

Joseph Young