0

it's possible to run javascript ES6 syntax on client browser to create a static web pages?

what I mean here is it can be run without any process from server like nodejs *sorry for my bad english

17th Sep 2017, 3:56 PM
Tio Misbaqul Irawan
Tio Misbaqul Irawan - avatar
7 odpowiedzi
+ 11
of course you can just run and write on newer browsers but there may be some compatibility issues with older browsers. check can I use site for compatibility of certain ES6 features on target platform http://caniuse.com/es6-module ES6 module - Can I use... Support tables for HTML5, CSS3, etc https://kangax.github.io/compat-table/ ECMAScript 6 compatibility table - kangax.github.com https://www.sitepoint.com/the-es6-conundrum/ The ES6 Conundrum — SitePoint
17th Sep 2017, 4:15 PM
Lord Krishna
Lord Krishna - avatar
+ 10
no they are not supported in most browsers only 39% http://caniuse.com/#search=module use the https://www.caniuse.com for web based features compatibility across web browsers.
17th Sep 2017, 4:41 PM
Lord Krishna
Lord Krishna - avatar
+ 8
Javascript is run client side in web browsers you can use it for static pages. ES6 compatibility depends on the browser version. you can write ES6 code and have it transpiled by babel for ES5 compatibility. https://babeljs.io/ Babel · The compiler for writing next generation JavaScript
17th Sep 2017, 4:02 PM
Lord Krishna
Lord Krishna - avatar
+ 2
thanks
17th Sep 2017, 4:19 PM
Tio Misbaqul Irawan
Tio Misbaqul Irawan - avatar
+ 2
:( thanks again
18th Sep 2017, 1:19 AM
Tio Misbaqul Irawan
Tio Misbaqul Irawan - avatar
+ 1
i know babel, i mean without using compiler like babel, just write and run
17th Sep 2017, 4:06 PM
Tio Misbaqul Irawan
Tio Misbaqul Irawan - avatar
+ 1
one again, can I use import and export? I've tried it, but it's not working
17th Sep 2017, 4:29 PM
Tio Misbaqul Irawan
Tio Misbaqul Irawan - avatar