Created
April 9, 2019 07:34
-
-
Save MurhafSousli/4354ea54734098863ff65518e132fd8a to your computer and use it in GitHub Desktop.
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
function add(a, b) { | |
return parseInt(a) + parseInt(b); | |
} | |
if (!process.argv[2] || !process.argv[3]) { | |
console.log('Insufficient number of arguments! Give two numbers please!'); | |
} | |
else { | |
console.log('The sum of', process.argv[2], 'and', process.argv[3], | |
'is', add(process.argv[2], process.argv[3])); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment