Computer Science, asked by najishahmed3270, 11 months ago

How to get base 2 logarithm of E in JavaScript?

Answers

Answered by theyashsehgal
0

The Math.log() function in JavaScript is used to return the natural logarithm (base e) of a number.

The JavaScript Math.log() function is equivalent to ln(x) in mathematics.

If the value of x is negative, then math.log() function return NaN.

log() is a static method of Math, therefore, it is always used as Math.log(), rather than as a method of a Math object created.

Similar questions