bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/JavaScript/Debugging, Projects, and Reference
JavaScript•Debugging, Projects, and Reference

ECMAScript 2016

Flash cards

Review the key moves

1/4
Core idea

What is the main idea behind ECMAScript 2016?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

2Fill blank

Complete the missing token from the example code.

___ z = x ** 2;
3Order

Put the learning moves in the order that makes the concept easiest to apply.

Exponentiation Assignment
Exponentiation Operator
New Features in JavaScript 2016

New Features in JavaScript 2016

Supported in all modern browsers since March 2017 .

FeatureDescription
**Raises the first operand to the power of the second
**=Raises the value of a variable to the power of the right operand
Array includes()Checks if an element is present in an array

Browser Support

JavaScript 2016 is supported in all modern browsers since March 2017 :

Chrome 52Edge 15Firefox 52Safari 10.1Opera 39
Jul 2016Apr 2017Mar 2017May 2017Aug 2016

ES 2016 is not supported in Internet Explorer.

Exponentiation Operator

The exponentiation operator ( ** ) raises the first operand to the power of the second operand.

Example

let x = 5;
let z = x ** 2;

x ** y produces the same result as Math.pow(x, y) :

Example

let x = 5;
let z = Math.pow(x,2);

Exponentiation Assignment

Example

let x = 5;
x **= 2;

JavaScript Array includes()

ECMAScript 2016 introduced Array.includes to arrays.

This allows us to check if an element is present in an array:

Example

const fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.includes("Mango");

Previous

ECMAScript 2017

Next

Javascript 2015 (ES6)