MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/shittyprogramming/comments/b5om5u/abusing_javascripts_syntax_yay/ejg5pe4/
r/shittyprogramming • u/Droploris • Mar 26 '19
15 comments sorted by
View all comments
Show parent comment
5
But then you could no longer do the method chaining. This only works because all functions return the next function you need.
1 u/YRYGAV Mar 27 '19 Wouldn't semicolon insertion fix the issue anyways? 1 u/AyrA_ch Mar 27 '19 semicolon insertion is the problem which makes the lines look like individual instructions rather than a chain of them. 1 u/sim642 Mar 27 '19 There's no chaining then. Just multiple lines of code calling different functions, the most usual kind of code.
1
Wouldn't semicolon insertion fix the issue anyways?
1 u/AyrA_ch Mar 27 '19 semicolon insertion is the problem which makes the lines look like individual instructions rather than a chain of them.
semicolon insertion is the problem which makes the lines look like individual instructions rather than a chain of them.
There's no chaining then. Just multiple lines of code calling different functions, the most usual kind of code.
View all comments
Show parent comment
5
u/AyrA_ch Mar 26 '19
But then you could no longer do the method chaining. This only works because all functions return the next function you need.