How can i achieve something like this in for loop in ruby:
for(int i = 1;i<=10;i++){
if (i == 7){
i=9;
}
#some code here
}
I meant to say it's okay to use "next" to skip but what to do if I want to just jump to an uncertain iteration via changing the variable value itself. As far as I know loop works with enumerable type. I want to loop it via index as a variable, the way we do in C++