Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. function getValue (flag) {
  2. const index = process.argv.indexOf(flag);
  3. if (index > -1) {
  4. return process.argv[index + 1];
  5. }
  6. }
  7.  
  8. const name = getValue('-n');
  9. const mesage = getValue('-m');
  10.  
  11. console.log(`${mesage} ${name}`);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement