Math.cbrt

cbrt — Returns the cube root of a number.

Description

Math.cbrt(number number)

Parameters

Name Description Type Default Optional
number number No

Examples

Example #1 – cbrt example
console.log(Math.cbrt(1)); // 1 console.log(Math.cbrt(8)); // 2 console.log(Math.cbrt(27)); // 3 console.log(Math.cbrt(42)); // 3.4760266448864496 console.log(Math.cbrt(0)); // 0

External references