Created
July 30, 2020 10:36
-
-
Save nifrasismail/0354e7bfe2994ff2c2f6e818c19d1477 to your computer and use it in GitHub Desktop.
This file contains 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
//we have a function to accept arguments and return it. | |
const toArray = (arg1,arg2,arg3) => { | |
return [arg1,arg2,arg3]; | |
}; | |
/** | |
* now what we need to do it to make the function for to accept | |
* multiple number of arguments. | |
*/ | |
const toArray = (...args) => { | |
return args; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment