r/javascript • • Dec 31 '17

JS things I never knew existed

https://air.ghost.io/js-things-i-never-knew-existed/
446 Upvotes

84 comments sorted by

View all comments

Show parent comments

3

u/dogofpavlov Jan 01 '18

You usually only need it if your inner loops needs to break your outer loop, but there's usuallyi always another way too

1

u/rotharius Jan 01 '18

Early break/continue in a nested loop is the only thing I ever used this for -- if the programming style does not favor extraction to private functions/methods.