Created
July 26, 2021 16:05
-
-
Save NavaneethVijay/6d01ecfaa84c5062a976ecc8c1e0d286 to your computer and use it in GitHub Desktop.
Code snippets
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
/** | |
* Generate an array with specific size of number | |
* @param n {Number} | |
* @returns {Array} | |
*/ | |
function getArrayofSize(n) { | |
return Array.from(new Array(n), (x, i) => i + 1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment