Created
January 19, 2017 13:05
-
-
Save baluragala/cb49e62510c0c222db4823ea9dd4ef06 to your computer and use it in GitHub Desktop.
Command line arguments in node
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
[, , textToRepeat, limit] = process.argv; | |
for (let i = 1; i <= limit; i++) { | |
console.log(`${i}-${textToRepeat}`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment