delete

.delete( element )

Searches for the given element in this array, and if found, it will remove the first occurrence of it. If it is not found, then this silently does nothing.

names = [ 'Brian', 'Michael', 'Gareth' ]

names.delete( 'Gareth' ) // name is removed
names.delete( 'Ashley' ) // nothing happens

See also

deleteAt - deleteIf - filter