Parameters: This method does not accept any parameter.
Return Values: It simply returns the Value of the natural log of 2.
Below is an example of the Math LN2() Method.
Example 2: The value of the natural log of 2 can be printed in the form of a function as shown below.
Example 3: Here we consider Math.LN2 is a function but in actuality, it is a property which is why the error as output is being shown.
Error: Math.LN2 is not a function
Note: Check the console for errors.
- Google Chrome 1 and above
- Internet Explorer 3 and above
- Edge 12 and above
- Firefox 1 and above
- Opera 3 and above
- Safari 1 and above