2 ms·
I will never forget what I found when hacking the internals of Handsontable many years ago... JavaScript For loops with - :label (eg go to) - continue - bre
by nickstefan12 8y ago
I will never forget what I found when hacking the internals of Handsontable many years ago...
JavaScript For loops with
- :label (eg go to)
- continue
- break
It was definitely an interesting sperlunk!
- arcturus17 8y agoWhat’s so bad about continue and break? I’ve seen it in different languages in what I consider great projects... Sometimes you really need an exit in the middle of the loop.
- Drakim 8y agoWorst part is, I've seen devs wrap their entire for-loop in an anonymous function JUST so they could use a return; to break out of the loop, instead of using break;
- nickstefan12 8y agoNothing is particularly “bad”. I’ve used them in python a number of times. I’m more just commenting that it’s a strange / interesting code based worth sight seeing. It was written in a style that seemed like from another language.
- chrishere 8y agoI remember that particular loop. It’s already gone.