Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getValue (flag) {
- const index = process.argv.indexOf(flag);
- if (index > -1) {
- return process.argv[index + 1];
- }
- }
- const name = getValue('-n');
- const mesage = getValue('-m');
- console.log(`${mesage} ${name}`);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement