<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國際加速解決方案。 廣告
                ## 1.contact 只能展平一層 ~~~ [1,2,3].concat([4,5,6],[7,8,9]) // [1, 2, 3, 4, 5, 6, 7, 8, 9] ['a','b','c'].concat(1,[2,3],[[4,5]]) // ["a", "b", "c", 1, 2, 3, [4,5]] ~~~ ![](https://img.kancloud.cn/dc/5a/dc5ad545038c2e69396ae26585d53c69_1172x1018.png) ## 2. flat ~~~ [1, 2, [3, 4]].flat() // [1, 2, 3, 4] ~~~ ~~~ [1, 2, [3, [4, 5]]].flat() // [1, 2, 3, [4, 5]] 默認為1。 [1, 2, [3, [4, 5]]].flat(2) // [1, 2, 3, 4, 5] ~~~ ~~~ [1, [2, [3]]].flat(Infinity) // [1, 2, 3] // 如果不管有多少層嵌套,都要轉成一維數組,可以用`Infinity`關鍵字作為參數。 ~~~ ~~~ [1, 2, , 4, 5].flat() // [1, 2, 4, 5] 如果原數組有空位,`flat()`方法會跳過空位。 ~~~ ## 3.toString() toString()展平后每個數組中的至是字符串,可根據需要再轉換 ``` var arr=[ [1, 2, 2], [3, 4, 5, 5], [6, 7, 8, 9, [11, 12, [12, 13, [14] ] ] ], 10]; arr.toString(); ``` ![](https://img.kancloud.cn/b7/93/b7933b00480fa1eb12eb8c7802f01016_1462x160.png)
                  <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>

                              哎呀哎呀视频在线观看