久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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)站

      es6中some的作用是什么

      在es6中,some的作用是檢測(cè)數(shù)組中是否存在指定條件的元素;若存在指定的元素則返回的結(jié)果是true,若不存在指定的元素則返回的結(jié)果是false,語法為“array.some(回調(diào)函數(shù)),thisValue)”。

      es6中some的作用是什么

      本文操作環(huán)境:windows10系統(tǒng)、Vue2.9.6版,DELL G3電腦。

      es6中some的作用是什么

      some()方法測(cè)試數(shù)組中的某個(gè)元素是否通過了由提供的函數(shù)實(shí)現(xiàn)的測(cè)試。

      語法

      array.some(callback[, thisObject]);

      參數(shù)細(xì)節(jié)

      callback – 測(cè)試每個(gè)元素的函數(shù)。

      thisObject – 執(zhí)行回調(diào)時(shí)用作此對(duì)象的對(duì)象。

      返回值

      如果某個(gè)元素通過了測(cè)試,則返回true,否則返回false。

      function isBigEnough(element, index, array) {    return (element >= 10); } var retval = [2, 5, 8, 1, 4].some(isBigEnough); console.log("Returned value is : " + retval ); var retval = [12, 5, 8, 1, 4].some(isBigEnough); console.log("Returned value is : " + retval );

      輸出

      es6中some的作用是什么

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