Math.log

log — Returns the Math.E of a number.

Description

Math.log(number number)

Parameters

Name Description Type Default Optional
number number No

Examples

Example #1 – log example
console.log(Math.log(3)); // 1.0986122886681098 console.log(Math.log(8)); // 2.0794415416798357 console.log(Math.log(-3)); // NaN

External references