Latest web development tutorials

JavaScript LN2 property

Math Object Reference JavaScript Math Object

Examples

Returns the natural logarithm of 2:

Math.LN2;

Output:

0.6931471805599453

try it"

Definition and Usage

LN2 property is log e 2, namely the natural logarithm of 2, whose value is approximated .69314718055994528623.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support LN2 property.


grammar

Math.LN2

technical details

return value: Returns the natural logarithm (equivalent to about 0.693) 2.
JavaScript version: 1.0


Math Object Reference JavaScript Math Object