--- title: Math.LN10 slug: Web/JavaScript/Reference/Global_Objects/Math/LN10 tags: - JavaScript - Math - Property - Referencia translation_of: Web/JavaScript/Reference/Global_Objects/Math/LN10 original_slug: Web/JavaScript/Referencia/Objetos_globales/Math/LN10 ---
La propiedad Math.LN10 representa el logaritmo natural de 10, aproximadamente 2.302:
Porque LN10 es una propiedad estática de Math, siempre usted lo usa como Math.LN10, en lugar de como una propiedad de un objeto Math creado (Math no es un constructor).
Math.LN10La función siguiente devuelve el logaritmo natural de 10:
function getNatLog10() {
return Math.LN10
}
getNatLog10(); // 2.302585092994046
| Especificación | Estado | Comentario |
|---|---|---|
| {{SpecName('ES1')}} | {{Spec2('ES1')}} | Definición inicial. Implementado en JavaScript 1.0. |
| {{SpecName('ES5.1', '#sec-15.8.1.2', 'Math.LN10')}} | {{Spec2('ES5.1')}} | |
| {{SpecName('ES6', '#sec-math.ln10', 'Math.LN10')}} | {{Spec2('ES6')}} | |
| {{SpecName('ESDraft', '#sec-math.ln10', 'Math.LN10')}} | {{Spec2('ESDraft')}} |
{{Compat("javascript.builtins.Math.LN10")}}