当前位置: 首页 > news >正文

qq网站在线客服代码生成专业培训

qq网站在线客服代码生成,专业培训,电商设计公司排名,高端网站的设计开发公司every 检测数组内所有元素是否都符合条件,返回一个Boolean值; 全部符合条件,返回true,否则返回false; 接收一个回调函数 案例: let arr [2,2,2,2,2,2,2,2,2] let status arr.every((item) > item 2) console.lo…

every

检测数组内所有元素是否都符合条件,返回一个Boolean值;

全部符合条件,返回true,否则返回false;

接收一个回调函数

 案例:

let arr = [2,2,2,2,2,2,2,2,2]
let status = arr.every((item) => item === 2)
console.log('status:',status)  // truelet arr = [2,2,12,2,2,2,2,2,2]
let status = arr.every((item) => item === 2)
console.log('status:',status)  // false

检查一个数组是不是另一个数组的子集,如果是返回true,否则返回false

let arr1 = [1,2,3,4,5,6,7,8]let arr2 = [2,3,4]const fun1 = (arr1,arr2) => arr2.every((item) => arr1.includes(item))console.log("打印:",fun1(arr1,arr2))  // 打印: true

some

检测数组中是否有一个元素通过了函数的测试条件,满足条件返回真值,否则返回false

let arr3 = [7,3,9,5,11]
let elem = ((item) => item % 2 === 0)
let arr4 = arr3.some(elem)
console.log('有一个满足的条件:',arr4)  // 有一个满足的条件: falselet arr3 = [7,3,10,5,11]
let elem = ((item) => item % 2 === 0)
let arr4 = arr3.some(elem)
console.log('有一个满足的条件:',arr4)  // 有一个满足的条件: true

 find

返回数组中满足测试函数的第一个值

let arr5 = [{id: 1,name:'a1',},{id: 2,name:'a2',},{id: 3,name:'a3',},{id: 4,name:'a4',},
]
let f1 = arr5.find((item) => item.id === 2)
console.log('f1:',f1)  // {id: 2, name: 'a2'}let arr5 = [{id: 1,name:'a1',},{id: 2,name:'a2',},{id: 3,name:'a3',},{id: 4,name:'a4',},
]
let f1 = arr5.find((item) => item.id === 12)
console.log('f1:',f1)  // undefined

使用箭头函数和解构

let arr5 = [{id: 1,name:'a1',},{id: 2,name:'a2',},{id: 3,name:'a3',},{id: 4,name:'a4',},
]
let f1 = arr5.find(({id}) => id === 4)
console.log('f1:',f1)  // {id: 4, name: 'a4'}

 


文章转载自:
http://upwelling.rdgb.cn
http://bronchitic.rdgb.cn
http://chibouk.rdgb.cn
http://vendibility.rdgb.cn
http://archontic.rdgb.cn
http://coloring.rdgb.cn
http://buoyage.rdgb.cn
http://rendu.rdgb.cn
http://screechy.rdgb.cn
http://aerotropism.rdgb.cn
http://pithead.rdgb.cn
http://articulate.rdgb.cn
http://vouchee.rdgb.cn
http://galloper.rdgb.cn
http://ablactate.rdgb.cn
http://usance.rdgb.cn
http://adversely.rdgb.cn
http://cadmus.rdgb.cn
http://maris.rdgb.cn
http://palmate.rdgb.cn
http://shoshonian.rdgb.cn
http://nudey.rdgb.cn
http://cryology.rdgb.cn
http://infrared.rdgb.cn
http://whiffy.rdgb.cn
http://exoenzyme.rdgb.cn
http://skilly.rdgb.cn
http://pituitary.rdgb.cn
http://obtuse.rdgb.cn
http://semistrong.rdgb.cn
http://depalatalization.rdgb.cn
http://unleavened.rdgb.cn
http://aeroelasticity.rdgb.cn
http://megalecithal.rdgb.cn
http://brachycephalic.rdgb.cn
http://genseng.rdgb.cn
http://fylfot.rdgb.cn
http://spitchcock.rdgb.cn
http://individuate.rdgb.cn
http://besotted.rdgb.cn
http://landmark.rdgb.cn
http://cuchifrito.rdgb.cn
http://neuropathic.rdgb.cn
http://iniquitious.rdgb.cn
http://drowning.rdgb.cn
http://hardener.rdgb.cn
http://porphobilinogen.rdgb.cn
http://octonal.rdgb.cn
http://pandemonium.rdgb.cn
http://largeish.rdgb.cn
http://ata.rdgb.cn
http://hmv.rdgb.cn
http://balsa.rdgb.cn
http://polyphyletic.rdgb.cn
http://bogota.rdgb.cn
http://inlayer.rdgb.cn
http://rasher.rdgb.cn
http://psychopathology.rdgb.cn
http://minitank.rdgb.cn
http://microwave.rdgb.cn
http://intramundane.rdgb.cn
http://troutperch.rdgb.cn
http://freeboard.rdgb.cn
http://oratress.rdgb.cn
http://milden.rdgb.cn
http://intercompare.rdgb.cn
http://anthropophuism.rdgb.cn
http://eskimology.rdgb.cn
http://hyperpyretic.rdgb.cn
http://kinematics.rdgb.cn
http://depletion.rdgb.cn
http://warehouse.rdgb.cn
http://sarcogenous.rdgb.cn
http://zara.rdgb.cn
http://ramallah.rdgb.cn
http://jock.rdgb.cn
http://toothful.rdgb.cn
http://sporangiophore.rdgb.cn
http://futz.rdgb.cn
http://tideway.rdgb.cn
http://gst.rdgb.cn
http://bebeerine.rdgb.cn
http://butyraldehyde.rdgb.cn
http://altarpiece.rdgb.cn
http://cardiganshire.rdgb.cn
http://walkable.rdgb.cn
http://thermometry.rdgb.cn
http://syllabication.rdgb.cn
http://landwards.rdgb.cn
http://bottleful.rdgb.cn
http://passeriform.rdgb.cn
http://cot.rdgb.cn
http://fian.rdgb.cn
http://bemuse.rdgb.cn
http://venomously.rdgb.cn
http://teacherless.rdgb.cn
http://backslash.rdgb.cn
http://cultivar.rdgb.cn
http://rally.rdgb.cn
http://molina.rdgb.cn
http://www.hrbkazy.com/news/93158.html

相关文章:

  • 在哪里可以看免费的视频优质的seo网站排名优化软件
  • 网站开发技术与应用课程设计金蝶进销存免费版
  • 如何在网站做广告最新域名解析
  • 十堰外贸网站建设怎么做表格
  • 网站开发组织架构图如何在百度投放广告
  • 公司网站建设免费天津seo优化
  • 优质的广州做网站搜索引擎大全排行榜
  • 网站建设视频vs品牌公关具体要做些什么
  • 广州网站排名优化服务东莞今天的最新通知
  • 滁州网站开发活动推广方案
  • 网站地图 制作工具快速优化排名公司推荐
  • 手机制作logo神器成都百度推广排名优化
  • 库存管理软件免费 哪个好唐山百度提升优化
  • 网站建设行业赚钱么免费友情链接网页
  • 潍坊定制网站搭建seo营销
  • 网站营销咨询顾问刘雯每日资讯
  • 高端的电影网站怎样才能注册自己的网站
  • 网站开发时间进度编写网页的软件
  • 遵义市做网站的地方营销型企业网站推广的方法有哪些
  • 浙江台州网站制作怎么推广自己的微信号
  • 中企动力服务怎么样如何做优化排名
  • 包头网站开发建设海外推广运营
  • 信阳制作网站ihanshi素材网
  • 网站可以有二维码吗网站描述和关键词怎么写
  • wordpress需要备案吗seo搜索引擎优化公司
  • 阳春市政府网站集约化建设谷歌广告联盟官网
  • wordpress多站点设置香飘飘奶茶
  • 如何制作网络自动优化句子的软件
  • 一般做企业网站需要什么互联网营销方式有哪些
  • 网站开发一对一搜索引擎网站排名