Introduction to the ES6 Challenges
ECMAScript is a standardized version of JavaScript with the goal of unifying the language's specifications and features. As all major browsers and JavaScript-runtimes follow this specification, the term ECMAScript is interchangeable with the term JavaScript.
Most of the challenges on freeCodeCamp use the ECMAScript 5 (ES5) specification of the language, finalized in 2009. But JavaScript is an evolving programming language. As features are added and revisions are made, new versions of the language are released for use by developers.
The most recent standardized version is called ECMAScript 6 (ES6), released in 2015. This new version of the language adds some powerful features that will be covered in this section of challenges, including:
- Arrow functions
- Classes
- Modules
- Promises
- Generators
let
andconst
Note
Not all browsers support ES6 features. If you use ES6 in your own projects, you may need to use a program (transpiler) to convert your ES6 code into ES5 until browsers support ES6.
Upcoming Lessons
Explore Differences Between the var and let KeywordsCompare Scopes of the var and let KeywordsDeclare a Read-Only Variable with the const KeywordMutate an Array Declared with constPrevent Object MutationUse Arrow Functions to Write Concise Anonymous FunctionsWrite Arrow Functions with ParametersWrite Higher Order Arrow FunctionsSet Default Parameters for Your FunctionsUse the Rest Operator with Function ParametersUse the Spread Operator to Evaluate Arrays In-PlaceUse Destructuring Assignment to Assign Variables from ObjectsUse Destructuring Assignment to Assign Variables from Nested ObjectsUse Destructuring Assignment to Assign Variables from ArraysUse Destructuring Assignment with the Rest Operator to Reassign Array ElementsUse Destructuring Assignment to Pass an Object as a Function's ParametersCreate Strings using Template LiteralsWrite Concise Object Literal Declarations Using Simple FieldsWrite Concise Declarative Functions with ES6Use class Syntax to Define a Constructor FunctionUse getters and setters to Control Access to an ObjectUnderstand the Differences Between import and requireUse export to Reuse a Code BlockUse * to Import Everything from a FileCreate an Export Fallback with export defaultImport a Default Export