Check out example codes for "ruby remove value from array". It will help you in understanding the concepts better.

Code Example 1

a = [3, 2, 4, 6, 3, 8]
a.delete(3)

Code Example 2

# Altering the array:
a = [3, 2, 4, 6, 3, 8]
a.delete(3)
#=> 3
a
#=> [2, 4, 6, 8]

# Creating new array:
b = [3, 2, 4, 6, 3, 8]
b - [3]
#=> [2, 4, 6, 8]
b
#=> [3, 2, 4, 6, 3, 8]

Learn ReactJs, React Native from akashmittal.com