Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 163688e

Browse files
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

Lines changed: 11 additions & 0 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /