<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## typeof運算符 用于確定當前變量的值是什么數據類型 * typeof運算符 ```javascript console.log(typeof 123); // number console.log(typeof '123'); // string console.log(typeof true); // boolean console.log(typeof test); // function console.log(typeof undefined); // undefined console.log(typeof [1,2,3]); // object console.log(typeof {}); // object console.log(typeof null); // object ``` * 數組的類型也是object,這說明在Javascript中,數組本質上只是一種特殊的對象。( 遺留的問題:null和undefined的區別;) * 這里我們發現數組、對象、和 null 都是對象,但是在判斷類型的時候都判斷為object并不能很好的區分開來。為了能區分這三者,我們可以使用Object.prototype.toString方法。 ## `Object.prototype.toString`方法 要精確判斷對象類型可以使用js中的`Object.prototype.toString`方法(判斷對象屬于那種內置對象類型); ~~~javascript console.log(Object.prototype.toString.call(123)) //"[object Number]" console.log(Object.prototype.toString.call('123')) //"[object String]" console.log(Object.prototype.toString.call(undefined)) //"[object Undefined]" console.log(Object.prototype.toString.call(true)) //"[object Boolean]" console.log(Object.prototype.toString.call(null)) //"[object Null]" console.log(Object.prototype.toString.call({})) //"[object Object]" console.log(Object.prototype.toString.call([])) //"[object Array]" console.log(Object.prototype.toString.call(function(){})) //"[object Function]" ~~~
                  <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>

                              哎呀哎呀视频在线观看