Is there an equivalent of “continue” in Ruby?
Is there an equivalent of “continue” in Ruby?
Yes, there is an equivalent of the "continue" keyword in Ruby, and it is called next. In Ruby, when you use the next keyword inside a loop, it skips the rest of the current iteration and immediately proceeds to the next iteration of the loop. This behavior is similar to the "continue" keyword found in languages like C and Java.
Đăng nhập để tham gia thảo luận cùng mọi người.
Chưa có bình luận nào
Hãy là người đầu tiên chia sẻ suy nghĩ của bạn.