JavaScript中的Math.cbrt()函数
cbrt()Math对象的函数接受一个数字并返回其立方根。
语法
其语法如下
Math.cbrt(729)
示例
<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>输出结果
Cube root of the given number: 9