Skip to content

Instantly share code, notes, and snippets.

@anthonydelgado
Last active January 29, 2017 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonydelgado/b7e2f02e8115c19c8ab06c3170dd4793 to your computer and use it in GitHub Desktop.
Save anthonydelgado/b7e2f02e8115c19c8ab06c3170dd4793 to your computer and use it in GitHub Desktop.
var action = process.argv[2];
// We will then create a switch-case statement (if-then would also work).
// The switch-case will direct which function gets run.
switch(action){
case 'total':
total();
break;
case 'deposit':
deposit();
break;
case 'withdraw':
withdraw();
break;
case 'lotto':
lotto();
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment