Full error: xengine.js:2 Uncaught SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

I have no framework. This is pure flat HTML, CSS and JavaScript.

HTML goes on like this (up to relevant moment):
http://pastebin.com/s8s2KLmt

And the JavaScript (starting from line 1, no additional files, entire xengine.js):
http://pastebin.com/TcZSPi9D

Sorry for not putting this into code tags. I have issue with copying with Ctrl+V and the pop-up doesn't support the pasting in right-click menu.

I have been Googling for answers, but they involved frameworks. I don't use any. This error occurs both on Opera and Chrome, and I think that it will occur in every other browser. Any idea on how solve this?

Have I just found a bug, or my environment is screwed up?

On the first line of your file with the error, type 'use strict' followed by a newline. That should fix it. Some stuff in Javascript is only supported if you use strict mode.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.