Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

JavaScript LN2 Property

JavaScript LN2 Property

Math Object Reference JavaScript Math object

Example

Return the natural logarithm of 2:

Math.LN2;

Output result:

0.6931471805599453

Try it »


Definition and Usage

The LN2 property is loge2, the natural logarithm of 2, whose value is approximately 0.69314718055994528623.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All mainstream browsers support the LN2 property.


Syntax

Math.LN2

Technical Details

Return Value: Return the natural logarithm of 2 (approximately 0.693).
JavaScript version: 1.0

Math Object Reference JavaScript Math object