JavaScript(JS) math method - cbrt

The cbrt method in JavaScript's Math object returns the cube root of a number.

The cube root of a number x is a number y such that y * y * y = x.

The cbrt method takes one argument, which is the number whose cube root needs to be calculated. If the argument is not a number, it will be converted to one before the calculation. If the argument is NaN, NaN will be returned.

Here's an example usage:

refer ‮:ot‬theitroad.com
const x = 27;
const cbrtX = Math.cbrt(x);
console.log(cbrtX); // 3

In the above example, the cube root of 27 is calculated using the Math.cbrt method and assigned to the cbrtX variable. The result is then logged to the console.