because without lastIndexOf you'll get a sum of the total counts of each repeated char
lastIndexOf
Can someone go through the filter method with me on this one? I am confused by the use of lastIndexOf. Why can't the condition just be if(arr.indexOf(val) !== i?
This comment is hidden because it contains spoiler information about the solution
Loading collection data...
because without
lastIndexOf
you'll get a sum of the total counts of each repeated charCan someone go through the filter method with me on this one? I am confused by the use of lastIndexOf. Why can't the condition just be if(arr.indexOf(val) !== i?
This comment is hidden because it contains spoiler information about the solution