如何在 JavaScript 中獲取 10 的自然對數?


要獲取 10 的自然對數,請在 JavaScript 中使用 Math.LN10 屬性。它返回 10 的自然對數,約為 2.302。

可以嘗試執行以下程式碼來獲取 10 的自然對數

示例

 線上演示

<html>
   <head>
      <title>JavaScript Math LN10 Property</title>
   </head>
   <body>
      <script>
         var property_value = Math.LN10;
         document.write("Property Value: " + property_value);
      </script>
   </body>
</html

輸出

Property Value: 2.302585092994046

更新於: 2019 年 7 月 30 日

328 次瀏覽

開始你的職業

完成課程以獲得認證

開始學習
廣告