8000 Revision of js · anshi-the-coder/Javascript@5208f55 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5208f55

Browse files
Revision of js
1 parent 6ee2947 commit 5208f55

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Revision.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ let a =[2,1,5,3,4]
44
// })
55
// console.log(arr)
66

7-
let arr = a.map((value,index)=>{
8-
return value*index
7+
// let arr = a.map((value,index)=>{
8+
// return value*index
9+
// })
10+
// console.log(arr)
11+
12+
let arr=a.reduce((h1,h2)=>{
13+
return h1+h2
914
})
1015
console.log(arr)

0 commit comments

Comments
 (0)
0