久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      es6新增循環(huán)有哪些

      es6新增循環(huán)語句有一個:“for of”循環(huán)?!癴or..of”語句可循環(huán)遍歷整個對象,是在迭代器生產(chǎn)的一系列值的循環(huán);“for..of”循環(huán)的值必須是一個iterable(可迭代的),語法“for(當前值 of 數(shù)組){…}”。for-of循環(huán)不僅支持數(shù)組,還支持大多數(shù)類數(shù)組對象;它也支持字符串遍歷,會將字符串視為一系列Unicode字符來進行遍歷。

      es6新增循環(huán)有哪些

      前端(vue)入門到精通課程:進入學習
      Apipost = Postman + Swagger + Mock + Jmeter 超好用的API調(diào)試工具:點擊使用

      本教程操作環(huán)境:windows7系統(tǒng)、ECMAScript 6版、Dell G3電腦。

      以前for循環(huán),for in循環(huán);而ES6新增循環(huán):for of 循環(huán):遍歷(迭代,循環(huán))整個對象。

      for..of

      ES6新增了一個for..of循環(huán),在迭代器生產(chǎn)的一系列值的循環(huán)。for..of循環(huán)的值必須是一個iterable。

      var a = ["a", "b","c","d","e"] for(var idx in a){     console.log(idx) } // 0 1 2 3 4 for(var val of a){     console.log(val) } // a b c d e
      登錄后復制

      for..in在數(shù)組a的鍵/索引上循環(huán),for..ofa的值上循環(huán)?!?/p>

      贊(1)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號