Key Concepts

Review core concepts you need to learn to master this subject

ES5 & ES6 Compatibility

ECMAScript (ES) is a scripting language specification standardized by Ecma International for Javascript. ES5 is the older JavaScript version which is supported by all web browsers while the ES6 version, released in 2015, is not supported by all web browsers.

Browser Compatibility and Transpilation
Lesson 1 of 1
  1. 1
    You’re probably prompted to update your web browser every few months. Do you know why? A few reasons include addressing security vulnerabilities, adding features, and supporting new HTML, CSS, and …
  2. 2
    Since Ecma’s release of ECMAScript2015 (ES6), software companies have slowly added support for ES6 features and syntax. While most new browser versions support the majority of the ES6 library, ther…
  3. 3
    Now, it’s your turn to get some practice with . In a new tab, open and complete the tasks below.
  4. 4
    Before we learn how to set up a JavaScript project that converts ES6 to an older version, it’s worth understanding a few of the reasons Ecma made such substantial updates. The version of JavaScr…
  5. 5
    In the last exercise, you manually converted ES6 code to ES5. Although manual conversion only took you a few minutes, it is unsustainable as the size of the JavaScript file increases. Because ES6…
  6. 6
    In the last exercise, you wrote one command in your terminal to transpile ES6 code to ES5. In the next five exercises you will learn how to setup a JavaScript project that transpiles code when you …
  7. 7
    We use the npm install command to install new Node packages locally. The install command creates a folder called node_modules and copies the package files to it. The install command also instal…
  8. 8
    Now that you’ve downloaded the Babel packages, you need to specify the version of the source JavaScript code. You can specify the initial JavaScript version inside of a file named .babelrc. …
  9. 9
    There’s one last step before we can transpile our code. We need to specify a script in package.json that initiates the ES6+ to ES5 transpilation. Inside of the package.json file, there i…
  10. 10
    We’re ready to transpile our code! In the last exercise, we wrote the following script in package.json: “build”: “babel src -d lib” Now, we need to call “build” from the command line to t…
  11. 11
    In this lesson, you learned about browser compatibility and transpilation. Let’s review the key concepts: - ES5 — The old JavaScript version that is supported by all modern web browsers. - ES…

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo