Home>Article>Web Front-end> What does log in javascript mean?

What does log in javascript mean?

WBOY
WBOY Original
2021-12-07 11:47:53 3476browse

Log in JavaScript means "logarithm" and is a method of the Math object. The syntax is "Math.log(x)"; the log() method can return the natural logarithm of the number "x". If the parameter value is a negative number, the return result is "NaN". If the parameter value is 0, the return result is "-Infinity".

What does log in javascript mean?

The operating environment of this tutorial: Windows 10 system, JavaScript version 1.8.5, Dell G3 computer.

What is the meaning of log in JavaScript

log in JavaScript means "logarithm", the log() method returns the natural value of a number Logarithm (base E).

The syntax of this method is as follows:

Math.log(x)

If the parameter x is a negative number, NaN will be returned. If parameter x is 0, then -Infinity is returned. The result returned is the natural logarithm of x.

The example is as follows:

   123 

单击按钮显示不同数值的自然对数。

Output result:

What does log in javascript mean?

##[Related recommendations:

javascript learning tutorial

The above is the detailed content of What does log in javascript mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn