Skip to content

Instantly share code, notes, and snippets.

@travisdmathis
Created April 7, 2014 15:12
Show Gist options
  • Select an option

  • Save travisdmathis/10022160 to your computer and use it in GitHub Desktop.

Select an option

Save travisdmathis/10022160 to your computer and use it in GitHub Desktop.
var array = process.argv;
var arrayLength = array.length;
for (var i = 2; i < arrayLength; i++) {
var a = process.argv[i];
var total = 0;
$.each(a,function() {
total += this;
});
}
/Users/fluffheadsr/Projects/node/babysteps.js:6
$.each(a,function() {
^
ReferenceError: $ is not defined
at Object.<anonymous> (/Users/fluffheadsr/Projects/node/babysteps.js:6:2)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment