JS Built-ins
← Math14 / 215
MathLN10intermediate

Math.LN10 β€” use in log base 10 calculation

πŸ“– Usage Example
// Natural logarithm of 10
Math.LN10          // β†’ 2.302585092...
Math.log(10) === Math.LN10   // β†’ true

Use Math.LN10 as a precomputed constant for natural log base-10 conversions to avoid recalculation.

Math.LN10

Divide Math.log(n) by Math.LN10 to compute log₁₀(n).

Challenge: Use Math.LN10 to compute base-10 logarithms.

πŸ’‘ Hints (2)
  • β€’ log₁₀(n) = Math.log(n) / Math.LN10
  • β€’ This works for any positive n.