Curriculum
Course: JavaScript Basic
Login

Curriculum

JavaScript Basic

JSHome

0/216
Text lesson

Remainder

The modulus operator (%) yields the remainder of a division operation.

Example

let x = 5;
let y = 2;
let z = x % y;

In arithmetic, dividing two integers results in both a quotient and a remainder.

In mathematics, the outcome of a modulo operation represents the remainder after performing an arithmetic division.

Incrementing

The increment operator (++) increases numbers by one.

Example

let x = 5;
x++;
let z = x;