WHAT ARE THE PROS AND CONS OF USING JAVASCRIPT ES5 VERSUS ES6?

What are the pros and cons of using JavaScript ES5 versus ES6?

Pros

ES5:

You have a lot of browser support.

ES6:

You have tail call optimization.
You have import statements.
Lamba’s are pretty amazing.
Immutable and block scoping objects with “const” and “let”.
Classes and OO Inheritance.
Functors, and all that functional goodness.
String templates that handle interpolation for you.

Cons

ES5:

It doesn’t have everything that ES6 has.

ES6:

It doesn’t have all the support that ES5 has, but you can always transpile your ES6 code.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>