Skip to content

Instantly share code, notes, and snippets.

View aGuyNamedJonas's full-sized avatar

Jonas Peeck aGuyNamedJonas

View GitHub Profile
@aGuyNamedJonas
aGuyNamedJonas / listingArguments.js
Created May 30, 2016 15:37
node.js: List commandline arguments (#GistToSelf)
// print process.argv
process.argv.forEach(function (val, index, array) {
console.log(index + ': ' + val);
});
@aGuyNamedJonas
aGuyNamedJonas / ArrowFunctionsJS.md
Created May 30, 2016 14:50
Arrow function syntax, taken from the MDN page (#GistToSelf)

###Basic Syntax

(param1, param2, , paramN) => { statements }
(param1, param2, , paramN) => expression
         // equivalent to:  => { return expression; }

// Parentheses are optional when there's only one parameter:
(singleParam) => { statements }
singleParam => { statements }