4 ms·
Ah, you're right (finally tried it out). But it 100% works in a loop (usually for loop)
by trelane 2y ago
Ah, you're right (finally tried it out). But it 100% works in a loop (usually for loop)
- maccard 2y agoIt’s one of those things that I never knew I wanted until I started using it, and now i miss it when it’s not available.The reason you want it is the same reason you want to declare a variable in the statement of a for loop rather than pre declaring and using a while loop
- trelane 2y agoI've used it in go a lot. If you want to kludge it, you can still put a block around the if. But it's not nearly as nice
- deleted 2y ago[deleted]