Trying to delete from this array:
array = ["Dog", "Cat", "John Cena"]
But those won't work:
array.delete(1)
array.delete([1])
Any help is appreciated.
Alternatively:
array = ["Dog", "Cat", "John Cena"]
array[1, 1] = []
array # => ["Dog", "John Cena"]
As stated before you should be using Ruby Docs for help like this Ruby has amazing documentation and is a shame to waste the wealth of knowledge here.
https://ruby-doc.org/core-2.1.0/Array.html#method-i-delete_at
Array#delete
. That way, the Ruby developers can improve the documentation so that future developers don't stumble over the same problems you did. Make the world a better place!