<html>
<body>
<h1>JavaScript Math</h1>
<h2>The Math.log() Method</h2>
<p>Math.log() returns the natural logarithm (base E) of a number:</p>
<p id="demo"></p>
<script>
let a = Math.log2(2.7183);
let b = Math.log2(2);
let c = Math.log2(1);
let d = Math.log2(0);
let e = Math.log2(-1);
document.getElementById("demo").innerHTML =
a + "<br>" + b + "<br>" + c + "<br>" + d + "<br>" + e;
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_log2 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 05 Sep 2022 15:18:27 GMT -->
</html>