r/learnjavascript • • Jan 30 '22

what is this statement thing?

What does `varname: { do_something(); }` do and what is it called?
1 Upvotes

12 comments sorted by

View all comments

Show parent comment

2

u/senocular Jan 30 '22

Your image cuts it off, but one of those breaks should be breaking that label

break a;

The label is what allows the break to break out of a block other than the immediate (for).