How to use Math LN10 Property in JavaScript

In this article, I will explain use of Math LN10 Property in JavaScript.
  • 2096

JavaScript Math LN10 Property

  • The LN10 property returns the natural logarithm of 10 which is approximately 2.302.

Syntax

Math.LN10

Example

The following example shows how to use Math LN10 Property in javascript.

<!DOCTYPE html>

<html>

<body>

<h2>This is the Math LN10 property example</h2>

<p id="demo">Click the button to display the natural logarithm of 10.</p>

<button onclick="myFunction()">Click</button>

<script type="text/javascript">

    function myFunction() {

        document.getElementById("demo").innerHTML = Math.LN10;

    }

</script>

</body>

</html>

 

Output 1

 

LN 10 output.jpg

Output 2


LN 10 final output.jpg

 

Further Readings

You may also want to read these related articles here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.