标签: ruby
对于红宝石,有时会有一个柜台,或者我必须做以下事情
count = 0 4.times do puts "this is the count #{count}" count = count+1
答案 0 :(得分:30)
是的,times会产生一个计数器:
times
4.times do |count| puts "this is the count #{count}" end