Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / JavaScript

Knowledge base — JavaScript

Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.

Entries: 1003

JavaScript

JSON.parse: JSON text to a JavaScript value

JSON.parse reads text in the strict JSON grammar and returns its JavaScript value, while an optional reviver can transform the result from leaves to root.

Intermediate · ECMAScript 5 onward; reviver context.source from ECMAScript 2026; example target: Node.js 24.22.2
JavaScript

JSON.stringify: a JavaScript value to JSON text

JSON.stringify serializes a JavaScript value to JSON text, with an optional replacer to select or transform data and space to control indentation.

Intermediate · ECMAScript 5 onward; well-formed lone-surrogate escaping from ECMAScript 2019; example target: Node.js 24.22.2
JavaScript

Map.groupBy: group iterable data into a Map

Map.groupBy iterates an iterable, computes a key for every element, and returns a Map whose values are arrays preserving input order.

Intermediate · ECMAScript 2024 onward; example target: Node.js 24.22.2
JavaScript

Map.prototype.clear: remove every entry

The clear method removes all key–value pairs from a Map in place, makes its observed size zero, and returns undefined.

Basic · ECMAScript 2015 onward; example target: Node.js 24.22.2
JavaScript

Map.prototype.delete: remove an entry by key

The delete method removes the Map entry matching a supplied key and returns true only when such an entry existed.

Basic · ECMAScript 2015 onward; example target: Node.js 24.22.2
JavaScript

Map.prototype.entries: key–value pair iterator

The entries method returns a live iterator of [key, value] pairs in Map insertion order and is the default Map iteration method.

Intermediate · ECMAScript 2015 onward; example target: Node.js 24.22.2
JavaScript

Map.prototype.forEach: callback for every entry

The forEach method calls a callback for every Map entry in insertion order, passing the value, key, and the Map itself.

Intermediate · ECMAScript 2015 onward; example target: Node.js 24.22.2
JavaScript

Map.prototype.get: read a value by key

The get method returns the value stored under a matching Map key, or undefined when no such entry exists.

Basic · ECMAScript 2015 onward; example target: Node.js 24.22.2
JavaScript

Map.prototype.has: test for a key

The has method returns a boolean indicating whether a Map contains an entry for the supplied key.

Basic · ECMAScript 2015 onward; example target: Node.js 24.22.2
JavaScript

Map.prototype.keys: key iterator

The keys method returns a live iterator over Map keys in insertion order without copying their associated values.

Intermediate · ECMAScript 2015 onward; example target: Node.js 24.22.2
JavaScript

Map.prototype.set: write an entry

The set method adds or updates a key–value pair in a Map and returns that same Map, enabling chaining.

Basic · ECMAScript 2015 onward; example target: Node.js 24.22.2
JavaScript

Map.prototype.size: entry count

The size property reads the current number of key–value entries in a Map as a non-negative integer.

Basic · ECMAScript 2015 onward; example target: Node.js 24.22.2
JavaScript

Map.prototype.values: value iterator

The values method returns a live iterator over Map values in the insertion order of their corresponding keys.

Intermediate · ECMAScript 2015 onward; example target: Node.js 24.22.2
JavaScript

Math.abs: absolute value

Math.abs converts its argument to Number and returns its non-negative absolute value, with defined behavior for zero, NaN, and infinities.

Basic · ECMAScript 1 onward; example target: Node.js 24.22.2
JavaScript

Math.acos: inverse cosine

Math.acos returns the inverse cosine of a number in radians, with real domain -1 through 1 and result 0 through π.

Intermediate · ECMAScript 1 onward; example target: Node.js 24.22.2
JavaScript

Math.asin: inverse sine

Math.asin returns the inverse sine of a number in radians, with real domain -1 through 1 and result -π/2 through π/2.

Intermediate · ECMAScript 1 onward; example target: Node.js 24.22.2
JavaScript

Math.atan: inverse tangent

Math.atan returns the inverse tangent of a number in radians, ranging from -π/2 to π/2 over the entire real line.

Intermediate · ECMAScript 1 onward; example target: Node.js 24.22.2
JavaScript

Math.atan2: angle from two components

Math.atan2 returns the directed angle of point (x, y) from the positive x-axis in radians while retaining quadrant information.

Intermediate · ECMAScript 1 onward; example target: Node.js 24.22.2
JavaScript

Math.ceil: round upward

Math.ceil converts its argument to Number and returns the smallest integral numeric value that is not less than the input.

Basic · ECMAScript 1 onward; example target: Node.js 24.22.2
JavaScript

Math.cos: cosine

Math.cos converts an angle in radians to Number and returns an approximate cosine in the range -1 through 1.

Intermediate · ECMAScript 1 onward; example target: Node.js 24.22.2
JavaScript

Math.E: Euler’s number

Math.E is an immutable Number property approximating Euler’s number e, the base of the natural logarithm.

Basic · ECMAScript 1 onward; example target: Node.js 24.22.2
JavaScript

Math.exp: exponential function

Math.exp converts its argument to Number and returns an approximation of e raised to that power.

Intermediate · ECMAScript 1 onward; example target: Node.js 24.22.2
JavaScript

Math.floor: round downward

Math.floor converts its argument to Number and returns the greatest integral numeric value that is not greater than the input.

Basic · ECMAScript 1 onward; example target: Node.js 24.22.2
JavaScript

Math.hypot: Euclidean length

Math.hypot converts any number of components to Number and stably computes the square root of their sum of squares.

Intermediate · ECMAScript 2015 onward; example target: Node.js 24.22.2