Reputation: 4032
How I can use ES6 global let
declaration?
let video = document.getElementById("video");
let button = document.getElementById("controllbutton");
The Above code causes Error that SyntaxError: missing ; before statement
on Firefox.
Why above code causes Syntax Error?
Upvotes: 0
Views: 79
Reputation: 4032
I added type="application/javascript;version=1.7"
in script tag, it resolved Syntax Error.
Upvotes: 1
Reputation: 558
Are you transpiling? I don't see browser support for FF for this feature: https://kangax.github.io/compat-table/es6/
Upvotes: 1