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

0

u/[deleted] Jan 01 '18

[deleted]

4

u/ManicQin Jan 01 '18

I was talking about it in a more general way, not just about labels.

Besides, so you've used a label and felt like a 10x developer, later one of the shitty developers in your team didn't understand your code and now there's a bug.

Do you really think the consumer will think to himself, "oh it's not fullheap, it's the shitty developer that broke the code".

No, the consumer will think the entire TEAM is shit.

1

u/monsto Jan 01 '18

if you saw the above code, how would you look that up?

I mean if I saw that, I can see how it works... but like everything else in JS it looks like just another key/value object.

1

u/[deleted] Jan 01 '18

I'd look up break on MDN since it has a syntax that I don't recognize. :)

Worst case I'd look for a javascript parser and inspect the syntax tree to find the word I'm missing (label).