JavaScript ES6 is so much more expressive than traditional JavaScript. Most of that boost comes from the spread operator which eliminates so much boilerplate and ceremony from your code.
JavaScript ES6 is so much more expressive than traditional JavaScript. Most of that boost comes from the spread operator which eliminates so much boilerplate and ceremony from your code.
Nice!
LikeLike
The only wrinkle is that for now you need to use a transpiler to use this in a browser. But these produce source maps as part of their output so you can run the debugger over the original ES6 source code.
LikeLike
John Hardy not a Turnbull fan Any in particular? Though I’ve written some JS now, I’ve not used a transpiler as yet. Seems like Babel is the nom du jour.
LikeLike
Yes Babel is the one, you can configure it to use the features you want. Otherwise it’s Typescript (which is going a bit over the top but Angular2 uses that).
You need to set up a build system anyway to concatenate, compress, minify etc.
LikeLike