Latest web development tutorials

JavaScript LOG2E property

Math Object Reference JavaScript Math Object

Examples

Returns the base 2 logarithm of e:

Math.LOG2E;

Output:

1.4426950408889634

try it"

Definition and Usage

LOG2E property is log2e, namely 2 logarithm to the base e, and its value is approximated value of 1.442695040888963387.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support LOG2E property.


grammar

Math.LOG2E

technical details

return value: Returns the base 2 logarithm of e (approximately equal to 1.414).
JavaScript version: 1.0


Math Object Reference JavaScript Math Object