#迭代器 5.times { puts "Hello Woeld!" } #连续输出4次Hello World! 1.upto(10) { |i| puts "The count is #{i}" } #从1数到10 10.downto(1) { |i| puts "The count is #{i}" } #从10到1 1.step(10, 2) { |i| puts "The count is #{i}" } #从1到10,步长为2 #each,使用each方法将集合内的对象逐个取出 name = ["MZD","JZM","HJT","XJP"] name.each do |x| puts x end
售后响应及时
7×24小时客服热线数据备份
更安全、更高效、更稳定价格公道精准
项目经理精准报价不弄虚作假合作无风险
重合同讲信誉,无效全额退款