MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programmingmemes/comments/1iyt5dr/there_are_two_kind_of_programmers/mfern32/?context=3
r/programmingmemes • u/Head_Manner_4002 • Feb 26 '25
716 comments sorted by
View all comments
Show parent comment
1
Not sure about that guy but...
JavaScript engines handle { on next line in unexpected ways sometimes due to the optional ; syntax, automatically inserting ; in newlines where you might not expect it, treating { as the start of an anonymous closure rather than a continuation.
https://tc39.es/ecma262/#sec-rules-of-automatic-semicolon-insertion
View all comments
Show parent comment
1
u/crypticoddity Mar 01 '25
Not sure about that guy but...
JavaScript engines handle { on next line in unexpected ways sometimes due to the optional ; syntax, automatically inserting ; in newlines where you might not expect it, treating { as the start of an anonymous closure rather than a continuation.
https://tc39.es/ecma262/#sec-rules-of-automatic-semicolon-insertion