Variadic functions in JS

Functions in JavaScript are variadic. This means they can be called with any number of arguments, whether you planned to receive them or not. (Node.js The Right Way)…

Context object vs. function calls

function foo() { console.log(this.a); } var obj = { a: 2, foo: foo }; obj.foo(); Regardless of whether foo() is initially declared on obj, or is added as a reference later (as this snippet shows), in neither case is the function really "owned" or "contained" by the obj object. However... the…

Function arguments

If your arguments are not meaningfully related your function might try to serve multiple purposes at once. @ogni42…