A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Math/log10 below:

Math.log10() - JavaScript | MDN

MDN Web Docs
  1. 面向开发者的 Web 技术
  2. JavaScript
  3. JavaScript 参考
  4. JavaScript 标准内置对象
  5. Math
  6. Math.log10()

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

Filter sidebar

在本文中
  1. JavaScript 标准内置对象
  2. Math
  3. 静态方法
    1. Math.abs()
    2. Math.acos()
    3. Math.acosh()
    4. Math.asin()
    5. Math.asinh()
    6. Math.atan()
    7. Math.atan2()
    8. Math.atanh()
    9. Math.cbrt()
    10. Math.ceil()
    11. Math.clz32()
    12. Math.cos()
    13. Math.cosh()
    14. Math.exp()
    15. Math.expm1()
    16. f16round()
    17. Math.floor()
    18. Math.fround()
    19. Math.hypot()
    20. Math.imul()
    21. Math.log()
    22. Math.log1p()
    23. Math.log2()
    24. Math.log10()
    25. Math.max()
    26. Math.min()
    27. Math.pow()
    28. Math.random()
    29. Math.round()
    30. Math.sign()
    31. Math.sin()
    32. Math.sinh()
    33. Math.sqrt()
    34. sumPrecise()
    35. Math.tan()
    36. Math.tanh()
    37. Math.trunc()
  4. 静态属性
    1. Math.E
    2. Math.LN2
    3. Math.LN10
    4. Math.LOG2E
    5. Math.LOG10E
    6. Math.PI
    7. Math.SQRT1_2
    8. Math.SQRT2
在本文中 Math.log10()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

概述

Math.log10() 函数返回一个数字以 10 为底的对数。

语法
Math.log10(x)
参数
x

任意数字。

描述

如果传入的参数小于 0,则返回 NaN.

示例

js

Math.log10(10); // 1
Math.log10(100); // 2
Math.log10("100"); // 2
Math.log10(1); // 0
Math.log10(0); // -Infinity
Math.log10(-2); // NaN
Math.log10("foo"); // NaN
规范 Specification ECMAScript® 2026 Language Specification
# sec-math.log10
浏览器兼容性 参见 Help improve MDN Was this page helpful to you? Learn how to contribute

.

This page was last modified on 2024年1月22日 by MDN contributors.

View this page on GitHub

•

Report a problem with this content

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4