Last active
September 19, 2016 14:11
-
-
Save yetithefoot/4828a724345683c4d0b7bcac1b33f9b0 to your computer and use it in GitHub Desktop.
Junior Front-end Developer | Duplicate function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function duplicate(){ | |
// write your one-line implementation here | |
} | |
// should prints [1,2,3,4,5,1,2,3,4,5] | |
console.log(duplicate([1,2,3,4,5])); | |
// should prints ['a','b','c','a','b','c'] | |
console.log(duplicate(['a','b','c'])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment