arr = ['Jack', 'Ross', 'Buggi', 'Mimi', 'Zolo', 'Roy']
From this array if want to remove certain values like lets say Buggi and Zolo, how can I do that so that the arr looks something like
arr = ['Jack', 'Ross', 'Mimi', 'Roy']
Buggie and Zolo are just examples, it can be any element Ross, Roy.
I want to implement this in rails.
I suggest using arr.filter()
with a block that defines the defines the items you want to keep.