Introduction to ES6

Get an overview of ES6.

We'll cover the following

By the end of this chapter, we’ll be able to do the following:

  • Explain the history and significance of ES6.
  • Utilize ES6 on the browser and the server.
  • Leverage ES6 features to write more concise and performant JavaScript.

This chapter assumes we have a basic knowledge of JavaScript.

ES6 Background

ES6, which stands for “ECMAScript 6,” is the sixth version of ECMAScript. It was published in 2015, and it’s also known as ECMAScript 2015. ECMAScript provides a standard for JavaScript.

Why use ES6?

As we’ll see, ES6 offers more concise and intuitive syntax, including template strings, arrow functions, modules, and classes. Its language features help make code more readable.

Modern web browsers can efficiently execute ES5, but ES6 doesn’t have full browser compatibility. To use the complete set of ES6 features today, we’ll need to transpile (or rewrite) our code back down to ES5 so that current browsers can interpret it. Transpiler tools like Babel and Traceur help make this process easier. We can use either tool to transpile ES6 in the browser or the server.

JavaScript is a constantly evolving language. With each new version of ECMAScript released, improved language features are introduced to make a developer’s life easier.

Get hands-on with 1200+ tech skills courses.