<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國際加速解決方案。 廣告
                [TOC] ## eval 把一個字符串變為JS表達式執行, 例如: ``` eval("12+23+34+45") ->114 eval("23,34,45,56") ->56 ``` ### eval 和 node中的runInThisContext ``` let a = 'ahhh'; eval('console.log(a)'); //ahhh let vm = require('vm'); vm.runInThisContext(`console.log(a)`); //沙箱 完全隔離 讀不到外面的a //ReferenceError: a is not defined ``` ## 括號表達式 括號表達式可以執行單個或多個表達式 返回最后一個表達式的值,多個表達式之間需要用逗號“,”分隔開 ``` (1,2+3,4+5,6)//代碼會被一次執行,最后將6作為返回值 ``` ### 括號表達式與函數 ``` function fn1(){console.log(1)}; function fn2(){console.log(2)}; // ;(function(){ // console.log() // })(); ;(fn1,fn2)(); //->2 ->只有fn2執行了 ->(x1,x2,x3...)括號表達式,一個括號中出現多項內容,中間用","隔開,但是我們最后獲取到的結果只有最后一項 function fn1(){console.log(this)}; function fn2(){console.log(this)}; var obj = {name:'ahhh',fn:fn2}; (fn2,obj.fn)(); //->執行的是obj.fn,但是執行的時候里面的this變為了window而不是obj //因為括號表達式中obj.fn相當于是把fn2的值copy一份放進來 (obj.fn)(); //->但如果只有一項,this還是obj ```
                  <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>

                              哎呀哎呀视频在线观看