Also I know that theoretically this can achieved using ‘goto’ but I don’t like that approach.
that was exactly the reason why there's `goto`. a usable continue keyword has some ugly interactions with true lexical scoping, so ironically the `goto` is the cleaner way.