<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                [TOC] ## Number 對象 * `Number.POSITIVE_INFINITY`:正的無限,指向`Infinity`。 * `Number.NEGATIVE_INFINITY`:負的無限,指向`-Infinity`。 * `Number.NaN`:表示非數值,指向`NaN`。 * `Number.MIN_VALUE`:表示最小的正數(即最接近0的正數,在64位浮點數體系中為`5e-324`), 相應的,最接近0的負數為`-Number.MIN_VALUE`。 * `Number.MAX_SAFE_INTEGER`:表示能夠精確表示的最大整數,即`9007199254740991`。 * `Number.MIN_SAFE_INTEGER`:表示能夠精確表示的最小整數,即`-9007199254740991`。 ## 實例方法 ### Number.prototype.toFixed() 保留小數 ``` 100.2253.toFixed(2)) // 100.23 四舍五入,返回字符串 Number(100.2253.toFixed(2))) //返回浮點 ``` ### Number.prototype.toExponential() 轉為科學計數法 ``` (10).toExponential() // "1e+1" (10).toExponential(1) // "1.0e+1" (10).toExponential(2) // "1.00e+1" (1234).toExponential() // "1.234e+3" (1234).toExponential(1) // "1.2e+3" (1234).toExponential(2) // "1.23e+3" ``` ### Number.prototype.toPrecision() 指定位數的有效數字 ``` (12.34).toPrecision(1) // "1e+1" (12.34).toPrecision(2) // "12" (12.34).toPrecision(3) // "12.3" (12.34).toPrecision(4) // "12.34" (12.34).toPrecision(5) // "12.340" ``` ### 自定義方法 ``` Number.prototype.add=function (x) { return this+x } //調用方式一 var a =8; a.add(4); //12 //調用方式二 8['add'](4); //12 //調用方式三 (8).add(4); //12 a;//8 ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看