Ruby - Arrays
What is the output of the following Ruby code?
a = [1, 2, 3, 4] b = [3, 4, 5, 6] result = a | b puts result.inspect
What is the output of the following Ruby code?
a = [1, 2, 3, 4] b = [3, 4, 5, 6] result = a | b puts result.inspect
| operator combines all unique elements from both arrays.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions