Ruby concepts

Ruby · Arrays

Ruby Arrays puzzles

2 Ruby puzzles on arrays. Read the snippet, guess the output, then reveal the answer and why Ruby behaves that way.