34
rated 0 times
[
37]
[
3]
/ answers: 1 / hits: 116822
/ 7 Years ago, wed, january 18, 2017, 12:00:00
I'm new to ES6 (ECMAScript 6), and I'd like to use its module system in the browser. I read ES6 is supported by Firefox and Chrome, but I'm getting the following error using export
Uncaught SyntaxError: Unexpected token import
I have a test.html file
<html>
<script src=test.js></script>
<body>
</body>
</html>
and a test.js file
'use strict';
class Test {
static hello() {
console.log(hello world);
}
}
export Test;
Why?
More From » html