[en-US] general.skip_to_content

Syntax

The grammar of JavaScript.

Destructuring
Completion percentage: 96% (22814)
Completion percentage: 96% (22814)

The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables.

2019

2020

Have used it
Know about it
Never heard of it
💡

The Export button at the top of each block lets you get the raw JSON data for any chart, or a GraphQL query you can run against our public API.

Spread Operator
Completion percentage: 95.7% (22753)
Completion percentage: 95.7% (22753)

Spread syntax (...) allows an iterable such as an array expression or string to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected, or an object expression to be expanded in places where zero or more key-value pairs (for object literals) are expected.

2019

2020

Have used it
Know about it
Never heard of it

Arrow Functions
Completion percentage: 95.5% (22695)
Completion percentage: 95.5% (22695)

An arrow function expression is a compact alternative to a traditional function expression, but is limited and can't be used in all situations.

2019

2020

Have used it
Know about it
Never heard of it
We asked members of the JavaScript community to share their “pick of the year”

My 2020 Pick: A11y Coffee

This is a fantastic intro resource for learning about web accessibility! I picked it because it's our job as JS devs to make sure that the sites we build are usable by everyone, not just sighted keyboard-and-mouse users.

We asked members of the JavaScript community to share their “pick of the year”

Josh W. Comeau

Software-engineer-turned-educator

Nullish Coalescing
Completion percentage: 95.7% (22737)
Completion percentage: 95.7% (22737)

The nullish coalescing operator (??) is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand.

2020

Have used it
Know about it
Never heard of it

Optional Chaining
Completion percentage: 95.7% (22746)
Completion percentage: 95.7% (22746)

The optional chaining operator (?.) enables you to read the value of a property located deep within a chain of connected objects without having to check that each reference in the chain is valid.

2020

Have used it
Know about it
Never heard of it

Private Fields
Completion percentage: 95.9% (22786)
Completion percentage: 95.9% (22786)

Class fields are public by default, but private class members can be created by using a hash # prefix. The privacy encapsulation of these class features is enforced by JavaScript itself.

2020

Have used it
Know about it
Never heard of it

Recommended Resources

Professional JavaScript Learning Path

From JavaScript foundations, all the way to Hardcore Functional JavaScript, find out how far you can go with your JavaScript abilities in this comprehensive learning path.
Thanks to our partners for supporting us! Learn more.