Hacker News new | ask | show | jobs
by shogun21 3806 days ago
Two questions: what happens if you use ES6 standards in a browser that does not support it?

And would it be wise to hold off adopting until all browsers support it?

1 comments

You'll get an errror :) (probably a syntax error)

You don't need to hold off on using it but you should definitely use a compiler like Babel[1] to compile your ES6 code to ES3 for compatibility.

[1] https://babeljs.io/

Shouldn't ES5 be god enough at this point (honest question)?
Yes, in most cases. As always, the pro way to do it is to examine the browser statistics for your target market, decide which browsers you will/won't support, and build and test for those browsers. If you don't want to go to all that effort for your smaller project, the bottom line is that most developers today end up targeting ES5.