JavaScript Math.cbrt() | Cube Root of a Number

The JavaScript Math.cbrt() method is used when we need to find the cubic root of a number. For example:

HTML with JavaScript Code
<!DOCTYPE html>
<html>
<body>

   <p id="xyz"></p>
 
   <script>
      let x = 343;
      document.getElementById("xyz").innerHTML = Math.cbrt(x);
   </script>
   
</body>
</html>
Output

JavaScript Math.cbrt() Syntax

The syntax of Math.cbrt() method in JavaScript is:

Math.cbrt(val)

The val parameter is required, refers to a number whose cube root will be returned.

JavaScript Online Test


« Previous Tutorial Next Tutorial »