Coding dilemma, help needed

I’ve never seen the loop command written like that, does it usually work?