易百教程

52、Ruby中有哪些迭代器?

Ruby 中有以下迭代器:

  • each迭代器
  • times迭代器
  • upto迭代器和downto迭代器
  • step迭代器
  • each_line迭代器