久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      javascript提供的循環(huán)結(jié)構(gòu)有哪些

      javascript提供的循環(huán)結(jié)構(gòu)有:1、for循環(huán),多次遍歷代碼塊;2、for/in循環(huán),遍歷對(duì)象屬性;3、while循環(huán),當(dāng)指定條件為true時(shí)循環(huán)一段代碼塊;4、do/while循環(huán),當(dāng)指定條件為true時(shí)循環(huán)一段代碼塊。

      javascript提供的循環(huán)結(jié)構(gòu)有哪些

      本文操作環(huán)境:windows7系統(tǒng)、javascript1.8.5版、Dell G3電腦。

      javascript提供的循環(huán)結(jié)構(gòu)有哪些?

      假如您需要運(yùn)行代碼多次,且每次使用不同的值,那么循環(huán)(loop)相當(dāng)方便使用。

      JavaScript 支持不同類型的循環(huán):

      1.for – 多次遍歷代碼塊

      for 循環(huán)的語(yǔ)法如下:

      for (語(yǔ)句 1; 語(yǔ)句 2; 語(yǔ)句 3) {      要執(zhí)行的代碼塊 }

      2.for/in – 遍歷對(duì)象屬性

      語(yǔ)法

      for (key in object) {   // code block to be executed }

      3.while – 當(dāng)指定條件為 true 時(shí)循環(huán)一段代碼塊

      語(yǔ)法

      while (條件) {     要執(zhí)行的代碼塊 }

      4.do/while – 當(dāng)指定條件為 true 時(shí)循環(huán)一段代碼塊

      語(yǔ)法

      do {     要執(zhí)行的代碼塊 }  while (條件);

      關(guān)于javascript循環(huán)相關(guān)知識(shí),請(qǐng)查看javascript手冊(cè)中的《javascript循環(huán)》章節(jié)。

      視頻教程推薦:《javascript基礎(chǔ)教程》

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