Skip to content

Instantly share code, notes, and snippets.

@ninja-webdev
Created June 2, 2017 05:19
Show Gist options
  • Save ninja-webdev/f9b611aeaed05c7bf05066ac234f17f9 to your computer and use it in GitHub Desktop.
Save ninja-webdev/f9b611aeaed05c7bf05066ac234f17f9 to your computer and use it in GitHub Desktop.
6 Jars computation
function getJarPercentages(){
var totalBudget = process.argv[2];
console.log("55% of totalBudget is " + totalBudget * 0.55);
console.log("5% of totalBudget is " + totalBudget * 0.05 + " (GIV)");
console.log("10% of totalBudget is " + totalBudget * 0.10);
}
if(process.argv[2]) {
getJarPercentages();
} else {
console.log("no argument passed");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment