

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to get Natural logarithm of 2 in JavaScript?
<p style="">To get the Natural logarithm of 2, use the Math.LN2 property in JavaScript. It returns the natural logarithm of 2, which is approximately 0.693.</p><h2>Example</h2><p style="">You can try to run the following code to get Natural logarithm of 2 −</p><p><a href="http://tpcg.io/tsYozK" rel="nofollow noopener noreferrer" target="_blank">Live Demo</a></p><pre class="prettyprint notranslate"><html> <head> <title>JavaScript Math LN2 Property</title> </head> <body> <script> var property_value = Math.LN2 document.write("Property Value is : " + property_value); </script> </body> </html></pre><h2>Output</h2><pre class="result notranslate">Property Value is : 0.6931471805599453</pre>
- Related Questions & Answers
- How to get Natural logarithm of 10 in JavaScript?
- How to get base 2 logarithm of E in JavaScript?
- How to get the natural logarithm (base E) of a number in JavaScript?
- Get natural logarithm value using Math.log in Java
- Compute the Natural Logarithm in Python
- Compute the natural logarithm with scimath in Python
- How to get the square root of 2 in JavaScript?
- Compute the Natural logarithm for complex-valued input in Python
- Compute the sign and natural logarithm of the determinant of an array in Python
- Return the base 2 logarithm of the input array in Python
- Compute the logarithm base 2 with scimath in Python
- Logarithm of the sum of exponentiations of the inputs in base-2 in Numpy
- Return the natural logarithm of one plus the input array element-wise in Numpy
- Get the base 10 logarithm of a value in Java
- Return the base 2 logarithm for complex value input in Python
Advertisements