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