Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env node
- var sum = 0;
- var count = 0;
- process.argv.forEach(function (val, index, array){
- if(index > 1){
- sum += parseInt(val);
- count ++;
- }
- })
- console.log(sum/count);
Advertisement
Add Comment
Please, Sign In to add comment