Comment inverser le tableau dans Ruby
# ruby
arr = [0,1,2]
# reverse
arr_rev = arr.reverse
# arr_rev = [2,1,0]; arr = [0,1,2]
arr == arr_rev.reverse!
# true
# ! immediately changes the value and stores it back to the variable
Dizzy Dog