Javascript Remove Elements From Array By Condition