4 ms·
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... Under "i
by joshribakoff 8y ago
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Under "instances" there is a list of mutators, accessors, and iterators that I find more useful since it is grouped and alphabetized.
Another pitfall I have seen Dev's make is to assume .filter() will return the original array even if the callback returns true for every element. In fact it always returns a copy, even if all elements pass the filter
I recommend the npm package deep-freeze in conjunction with unit testing, makes this way easier to debug.