Math.cbrt() function in JavaScript


The cbrt() function of the Math object accepts a number and returns its cube root.

Syntax

Its Syntax is as follows

Math.cbrt(729)

Example

<html>
<head>
   <title>JavaScript Example</title>
</head>
<body>
   <script type="text/javascript">
      var result = Math.cbrt(729));
      document.write("<br>");
      document.write("Cube root of the given number: "+result);
   </script>
</body>
</html>

Output

Cube root of the given number: 9

Samual Sam
Samual Sam

Learning faster. Every day.

Updated on: 25-Jun-2020

33 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements