JavaScript - Math.LOG2E Property
The JavaScript Math.LOG2E property is the base-2 logarithm of e. It is approximately 1.443.
Syntax
Math.LOG2E
Example:
The example below shows the usage of Math.LOG2E property.
var txt; txt = "Math.LOG2E = " + Math.LOG2E + "<br>"; txt = txt + "Math.pow(2, Math.LOG2E) = " + Math.pow(2, Math.LOG2E) + "<br>"; txt = txt + "Math.exp(1/Math.LOG2E) = " + Math.exp(1/Math.LOG2E) + "<br>";
The output (value of txt) after running above script will be:
Math.LOG2E = 1.4426950408889634 Math.pow(2, Math.LOG2E) = 2.718281828459045 Math.exp(1/Math.LOG2E) = 2
❮ JavaScript - Math Object