JavaScript中的Math.log2()函数
Math对象的log2()函数接受一个数字,并返回给定数字的自然对数(以2为底)。
语法
其语法如下
Math.log2(48);
示例
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<script type="text/javascript">
var result = Math.log2(48);
document.write("Result: "+result);
</script>
</body>
</html>输出结果
Result: 5.584962500721156
热门推荐
10 新年英文祝福语简短老师
11 广东考试祝福语朋友简短
12 乔迁祝福语简短笑话作文
13 撩妹生日祝福语简短
14 答谢老师的简短祝福语
15 简短有力的结婚祝福语
16 单位搬迁员工祝福语简短
17 婆婆蛋糕祝福语简短英文
18 姐妹结婚红包简短祝福语