In C and many other languages, there is a continue
keyword that, when used inside of a loop, jumps to the next iteration of the loop. Is there any equivalent of this continue
keyword in Ruby?
Ruby – Equivalent of “continue” in Ruby
continuekeywordruby
Related Topic
- Ruby-on-rails – How to understand nil vs. empty vs. blank in Ruby
- Ruby – How to write a switch statement in Ruby
- Ruby – How to check if a value exists in an array in Ruby
- Ruby – How to write to file in Ruby
- Ruby – attr_accessor in Ruby
- Ruby – Difference between map and collect in Ruby
- Ruby, Difference between exec, system and %x() or Backticks
Best Answer
Yes, it's called
next
.This outputs the following: