How to get Natural logarithm of 10 in JavaScript?

JavascriptWeb DevelopmentFront End Technology

To get the Natural logarithm of 10, use the Math.LN10 property in JavaScript. It returns the natural logarithm of 10, which is approximately 2.302.

You can try to run the following code to get Natural logarithm of 10:

Example

 Live Demo

<html>
   <head>
      <title>JavaScript Math LN10 Property</title>
   </head>
   <body>
      <script>
         var property_value = Math.LN10;
         document.write("Property Value: " + property_value);
      </script>
   </body>
</html

Output

Property Value: 2.302585092994046
raja
Published on 16-Feb-2018 06:12:57

Advertisements