- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- 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
Advertisements