1 2 3 4 5 6 7 8 9 10 11 12 13 14
# Expected output: # [1] parsing CLI # [2] compiling shards # [3] shipping binary steps = [ "parsing CLI", "compiling shards", "shipping binary" ] steps.each_with_index do |step, index| puts "[#{index + 1}] #{step}" end