Curriculum
Course: JavaScript Basic
Login

Curriculum

JavaScript Basic

JSHome

0/216
Text lesson

Decrementing

The decrement operator () decreases numbers by one.

Example

let x = 5;
x–;
let z = x;

Exponentiation

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);