Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Make this work
- // duplicate([1,2,3,4,5]); // [1,2,3,4,5,1,2,3,4,5]
- //
- //
- // from https://github.com/h5bp/Front-end-Developer-Interview-Questions#contributors
- //
- //
- // is this good solution?
- function duplicate(arr) {
- return arr.concat(arr);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement