Daniel Contreras Daniel Contreras - 1 year ago 56
Linux Question

Why is Mozilla Firefox throwing a syntax error?

I'm running a CentOS VM on my windows host machine. The CentOS VM is hosting a local Apache server and for some odd reason the Firefox within the VM is throwing a syntax error to this piece of code here

getInput: function() {
for (let i in s) {
s[i].on("click", function() {

and is saying

SyntaxError: missing ; after for-loop initializer

However, google chrome on the VM is fine. And even chrome/firefox on the host machine are fine.. no errors whatsoever.

Answer Source

firefox on VM is 38.3.0

let was made available to web content in FF 44

so I figure that 38 is the latest linux version.

no, that's not the latest version of firefox. but if you're using your distro's package manager instead of installing official firefox builds then the update mechanism probably does not work.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download