Math LN10 Property - Javascript Math

Javascript examples for Math:LN10

Description

The LN10 property returns the natural logarithm of 10, approximately 2.302.

Return Value:

A Number, representing the natural logarithm of 10

The following code shows how to return the natural logarithm of 10:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<button onclick="myFunction()">Test</button>

<p id="demo"></p>

<script>
function myFunction() {//from  ww w .  ja  va 2 s.  c om
    document.getElementById("demo").innerHTML = Math.LN10;
}
</script>

</body>
</html>

Related Tutorials