The log() method is represented by the following syntax:
num - A number.
The natural logarithm of a number.
Here, we will understand log() method through various examples.
Let's see an example to print the natural logarithm of a number.Test it Now
0 1.6094379124341003 2.302585092994046
Let's see the result of log() method in different test cases.Test it Now
NaN NaN -Infinity
Here, you can test log() method with your own test cases.Test it Now