4 ms·
So much for abstraction if you need to understand the implementation of every function you'll every use in JavaScript.
by gnuvince 13y ago
So much for abstraction if you need to understand the implementation of every function you'll every use in JavaScript.
- yourad_io 13y ago> understand the implementation of every function Rather: remember three things that make up the majority of Array iterators' callback functions' signatures: Element, Index, Array. Shared by: .map, .every, .forEach, .filter, and probably some that I am forgetting. The exception I think is just .reduce[Right], which by definition requires its previous return value, so you have (retVal, elem, i, arr). Quite literally, if you remember .map callback, you remember .every callback :) Javascript deserves shtick for its truly bad parts (with, arguments, ...) and some missing parts, but .map and its friends aren't it.