Move item in array to another array
ruby
Solution
yep, it would look like this:
y.push x.delete_at(1)
`delete_at` will delete an element with given index from an array it's called on and return that object
Problem
Let's suppose that we have arrays `x = ['a', 'b', 'c']` and `y`. Is there an easy way to move, say, the second element of `x`, to `y`? So that in the end, `x` is `['a', 'c']` and `y` is `['b']`.