3 ms·
As long as we discuss noops, JavaScript provides one out of the box as `Function.prototype`. It can be called and does nothing. No need to create a new functio
by pygy_ 10y ago
As long as we discuss noops, JavaScript provides one out of the box as `Function.prototype`. It can be called and does nothing.
No need to create a new function object when you need a noop.
- bpicolo 10y agoAnd it's even immutable. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/prototype#Description https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... ~So functional~