Skip to content

Commit 163688e

Browse files
authoredJun 28, 2021
Create spreadArray.js
1 parent c909ae4 commit 163688e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
 

‎Javascript/spreadArray.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//Complete the function concatenate() in which you are given 5 arrays as parameters and you have to return a single array after concatenating all the arrays.
2+
3+
4+
Note: Use spread operator
5+
function concatenate(a1, a2, a3, a4, a5) {
6+
const arr= [...a1, ...a2, ...a3, ...a4, ...a5]
7+
return arr
8+
}
9+
10+
11+
module.exports = concatenate;

0 commit comments

Comments
 (0)
Please sign in to comment.