constfruits=["apple","banana","cherry"];// remove by value (could be multiple occurrences)constremovedBananaByValue=fruits.filter((fruit)=>fruit!=="banana");// remove by index (always at max. one occurrence)constremovedBananaByIndex=fruits.filter((fruit,index)=>index!==1);
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I like to do it the functional way with
filter()
.