- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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?
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.
Example
You can try to run the following code to get Natural logarithm of 2 −
<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>
Output
Property Value is : 0.6931471805599453
- Related Articles
- How to get Natural logarithm of 10 in JavaScript?
- How to get the natural logarithm (base E) of a number in JavaScript?
- How to get base 2 logarithm of E 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
- Compute the Natural logarithm for complex-valued input in Python
- Compute the sign and natural logarithm of the determinant of an array in Python
- How to get the square root of 2 in JavaScript?
- 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 of the input array in Python
- C++ Program to calculate the base 2 logarithm of the given value
- Compute the logarithm base 2 with scimath in Python
- Logarithm of the sum of exponentiations of the inputs in base-2 in Numpy

Advertisements