Parameters or Arguments
number The number used to calculate the cube root.
The cbrt() feature returns the cube root of a number.
Math is a placeholder object that contains mathematical features and constants of which cbrt() is one of these functions.
console.log(Math.cbrt(8)); console.log(Math.cbrt(27)); console.log(Math.cbrt(1000));
In this example, we have invoked the cbrt() characteristic using the Math class.
We have written the output of the cbrt() characteristic to the web browser console log, for demonstration purposes, to exhibit what the cbrt() characteristic returns.
The following will be output to the net browser console log:
2 3 10
In this example, the first output to the console log again 2 which is the cube root of eight (because two x two x 2 = 8).
The second output to the console log lower back 3 which is the cube root of 27 (because 3 x three x three = 27).
The 0.33 output to the console log returned 10 which is the cube root of 1000 (because 10 x 10 x 10 = 1000).