Javascript Reference - JavaScript LOG2E Property








The LOG2E property returns the base-2 logarithm of E, approximately 1.442.

Browser Support

LOG2E Yes Yes Yes Yes Yes

Syntax

Math.LOG2E

Return Value

A number representing the base-2 logarithm of E.

Example

The following code shows how to find out the value of base 2 logarithm of e.


console.log(Math.LOG2E);

The code above generates the following result.