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
热门推荐
1 初八祝福语简短语
10 新年祝福语和语句简短
11 大学报道祝福语简短
12 国庆中秋祝福语简短搞笑
13 长辈生日祝福语简短女性
14 最搞笑生日祝福语简短
15 今日祝福语简短10字
16 20岁简短生日祝福语
17 简短送嫂子生日祝福语
18 儿女的生日祝福语简短