totn JavaScript

JavaScript: Math.LN10 property

This JavaScript tutorial explains how to use the math property called Math.LN10 with syntax and examples.

Description

In JavaScript, Math.LN10 is a math property that is used to return the mathematical constant loge10 which is the natural logarithm of 10. Because Math.LN10 is a property of the Math object, it must be invoked through the placeholder object called Math.

Syntax

In JavaScript, the syntax for the Math.LN10 property is:

Math.LN10;

Parameters or Arguments

There are no parameters or arguments for the Math.LN10 property.

Returns

The Math.LN10 property returns the mathematical constant loge10 which has an approximate value of 2.302585092994046.

Note

  • The Math.LN10 property is a property of the Math object and not a math function. However, we have included the Math.LN10 property within our JS Math Functions section because you will most likely use this property in conjunction with the Math functions found in this section.

Example

Let's take a look at an example of how to use the Math.LN10 property in JavaScript.

For example:

console.log(Math.LN10);

In this example, we have invoked the Math.LN10 property using the Math class.

We have written the output of the Math.LN10 property to the web browser console log, for demonstration purposes, to show what the Math.LN10 property returns.

The following will be output to the web browser console log:

2.302585092994046

In this example, the Math.LN10 property returned a value of 2.302585092994046 which is the value of the mathematical constant loge10. This is the value of the natural logarithm of 10.