Array off kilter? You must Filter!
Sometimes your arrays can get a little long, and sometimes you don’t need all that in your life, so what can you do?
Well let me introduce you to a little method called filter. The basics are simple, take an array, slap a “.filter()” on the end of it, throw a word to represent each item in the array inside the parentheses with a fat arrow pointing to some argument, and if those items are true according to the argument, then it will get thrown into the new array….check out the example below
It really helps remove all that extra stuff that you don’t need! I could continue to show you examples of the filter method but in the spirit of the method itself I will trim the fat of this blog and end it now!