MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/rqgxw4/why/
r/badcode • u/FloxD_ • Dec 28 '21
9 comments sorted by
17
Either that or this
var url = this.prepareNewlyUrlSetGet(MapsUtil.removeURLParameterGet(window.location.serach, 'polygon'), '1');
2 u/[deleted] Dec 29 '21 var url = this.prepareNewlyUrlSetGet(MapsUtil.removeURLParameterGet(window.location.serach, 'polygon'), '1');Sorry bro, your code is worse because of the typo. 3 u/lak0mka Dec 29 '21 But one line
2
Sorry bro, your code is worse because of the typo.
3 u/lak0mka Dec 29 '21 But one line
3
But one line
10
This guy is gonna be hyped for the pipeline operator
9
Image Transcription: Code
var url = window.location.serach, url = MapsUtil.removeURLParameterGet(url, 'polygon'), url = this.prepareNewlyUrlSetGet(url, '1');
I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!
10 u/Deep-Jump-803 Dec 28 '21 Good human
Good human
1
This kind of thing drives me bonkers
Nothing wrong though. The code is properly readable as is and has no negative impact on performance. Or are you one of those people who prefer nesting functions for fun just to scroll sideways later?
3 u/EishLekker Dec 29 '21 Why not simply end the first two lines with semicolons?
Why not simply end the first two lines with semicolons?
17
u/lak0mka Dec 28 '21
Either that or this
var url = this.prepareNewlyUrlSetGet(MapsUtil.removeURLParameterGet(window.location.serach, 'polygon'), '1');10
u/[deleted] Dec 28 '21
This guy is gonna be hyped for the pipeline operator
9
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Dec 28 '21
Image Transcription: Code
I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!
1
u/brakkum Dec 28 '21
This kind of thing drives me bonkers
1
u/pr0xywars Dec 29 '21
Nothing wrong though. The code is properly readable as is and has no negative impact on performance. Or are you one of those people who prefer nesting functions for fun just to scroll sideways later?