当前位置:网站首页>JS interview questions - arrow function, find and filter some and every
JS interview questions - arrow function, find and filter some and every
2022-06-11 11:24:00 【kilito_ 01】

find and filter The difference between
var a = [1,2,3,4,5,6,7]
a.find(item =>{ retuen item > 2})
find What will be returned is the specific value And only match the first result
a.filter(item =>{ retuen item > 2})
Will return all greater than 2 The data of
filter Will return a new array , The original array will not change It will filter out all qualified data
some and every The difference between
They all put back Boolean values
a.some(item =>{ retuen item > 2})
some Yes, as long as there is a value that meets the condition It will return true
a.every (item =>{ retuen item > 2})
every All values must meet the conditions Will return true
边栏推荐
- 李飞飞:我更像物理学界的科学家,而不是工程师|深度学习崛起十年
- Is the securities account opened by qiniu Gang safe and reliable?
- Etcd的运行时重配置
- Adapter mode -- can you talk well?
- 使用Yolov5训练好模型调用电脑自带摄像头时出现问题:TypeError: argument of type “int‘ is not iterable的解决方法
- Jerry's ble chip power supply range and anti burn chip measures [chapter]
- WordPress数据库缓存插件:DB Cache Reloaded
- Using domestic MCU (national technology n32g031f8s7) to realize pwm+dma control ws2812
- 数字藏品app小程序公众号源码
- AcWing 1353. Ski resort design (greedy)
猜你喜欢

Exness: the progress of Russia Ukraine negotiations is limited, and the RBA's decision remains unchanged

Display of receiving address list 【 project mall 】

收货地址列表展示【项目 商城】

Surrounddepth: self supervised multi camera look around depth estimation
![Jerry's acquisition of ble OTA dual backup upgrade (can only be used for chips above 4mbits) [article]](/img/25/e90d23f5c3d2aa6790538b289137bf.png)
Jerry's acquisition of ble OTA dual backup upgrade (can only be used for chips above 4mbits) [article]

使用Yolov3训练自己制作数据集,快速上手

Inventory of the 9 most famous work task management software at home and abroad

木瓜移动CFO刘凡 释放数字时代女性创新力量

全国多年太阳辐射空间分布数据1981-2022年、气温分布数据、蒸散量数据、蒸发量数据、降雨量分布数据、日照数据、风速数据

設置默認收貨地址【項目 商城】
随机推荐
Jerry's acquisition of ble distinguishes between reset and wake-up [chapter]
Use yolov5 to train your own data set and get started quickly
Exness: the progress of Russia Ukraine negotiations is limited, and the RBA's decision remains unchanged
WordPress数据库缓存插件:DB Cache Reloaded
Node连接MySql数据库写模糊查询接口
Droid-slam: depth vision slam for monocular and binocular rgbd cameras
NFT digital collection system platform construction
木瓜移动CFO刘凡 释放数字时代女性创新力量
Jerry's acquisition of ble to check the causes of abnormal conditions such as abnormal code reset [chapter]
2022年最好的年金险产品是什么?
Use yolov3 to train yourself to make datasets and get started quickly
Enterprise wechat applet pit avoidance guide, welcome to add...
CAP理论听起来很高大上,其实很简单
数据库系统概论 ---- 第二章 -- 关系数据库(2.1~2.3)(重要知识点)
找到自己的优势,才能干活不累,事半功倍!
发布WordPress数据库缓存插件:DB Cache Reloaded 3.1
为WordPress相关日志插件增加自动缩略图功能
统计出现次数最多的前K个字符串
Jerry's blepr0 and PR1 are used as ordinary IO ports [chapter]
my. Binlog startup failure caused by the difference between [mysql] and [mysqld] in CNF