Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Math</h1>
<h2>The Math.log1p() Method</h2>
<p>Math.log1p() returns the natural logarithm (base E) of 1 + a number:</p>
<p id="demo"></p>
<script>
let a = Math.log1p(2.7183);
let b = Math.log1p(2);
let c = Math.log1p(1);
let d = Math.log1p(0);
let e = Math.log1p(-1);
document.getElementById("demo").innerHTML =
a + "<br>" + b + "<br>" + c + "<br>" + d + "<br>" + e;
</script>
</body>
</html>