当前位置:网站首页>Array.map()简写函数
Array.map()简写函数
2022-06-09 09:15:00 【你还差的远呢。】
下面两个函数是等价的
function fn(b) {
console.log(b);
}
function test(obj) {
obj.map((v)=>{
fn(v)
})
}
test([1, 2, 3, 4])
function fn(b) {
console.log(b);
}
function test(obj) {
obj.map(fn)
}
test([1, 2, 3, 4])
边栏推荐
- Neo4j realizes social recommendation (V)
- XML to map (recursively call to read all node contents of XML) readxml read XML
- MySQL uses while to batch insert data in stored procedures (performance difference between batch submission and single submission)
- Can I LINQ a JSON- Can I LINQ a JSON?
- 2022-2028 global technology monitoring countermeasures industry research and trend analysis report
- Interviewer: how to open a video? What is second on video?
- HVV blue team points north
- Esp32 learning notes [WiFi network] - 01ap & sta
- [antenna] [2] explanation of some nouns and simple concepts, still
- How do you view the multi runtime architecture of dapr and layotto?
猜你喜欢

How to use alicloud CDN to cache static websites deployed on function computing

【Android -- 面试】程序员月入过 W 的十大平台

Learn about graph database neo4j (I)

MySQL basic DML and DDL learning

Detailed introduction to MySQL basic data types

. Net C # Foundation (6): namespace - a sharp tool for organizing code
![[redis learning 11] data persistence of distributed cache, master-slave cluster](/img/ea/1f5065ef7856f5028644912e29b642.png)
[redis learning 11] data persistence of distributed cache, master-slave cluster

Postman 接口压力测试

【代码注释】doxygen

Will testing not be replaced by development?
随机推荐
Write InputStream to file write multipartfile to file
neo4j实现社交推荐(五)
Draw multiple polygons using canvas
微信小程序开发之菜单的创建
LeetCode_二叉树_前缀和_中等_437. 路径总和 III
2022-2028 global linear lamp industry research and trend analysis report
Redhat7 cracking (resetting) root password
LeetCode_模拟_中等_621. 任务调度器
2022-2028 global UAV detection and jamming system industry survey and trend analysis report
How to draw a picture gracefully
ERP 系统,编译和学习
【推荐系统】基于用户的协同过滤
[matlab] [digital simulation] [1] linprog solving linear programming, standard type
Qt development -- compilation of serial port assistant
MySQL basic multi table query
MySQL basic addition, deletion, modification and query exercise
MySQL基础 DML与DDL学习
重走Flutter状态管理之Riverpod最终篇
Omit 应用 减少 TS 重复代码
2022-2028 global consumer electronics leasing platform industry research and trend analysis report