MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/ps3dv5/but_why_from_production/hdorpy0/?context=3
r/badcode • u/CynicalFucc • Sep 20 '21
11 comments sorted by
View all comments
Show parent comment
-1
Maybe the first element shouldn't be considered?🤔
5 u/MattiDragon Sep 21 '21 No. See the function gets x - 1 0 u/kallefrommalle Sep 21 '21 Erm ok, then maybe the last element shouldn't be considered but they have a strict policy to never use math in for loop conditions. 2 u/[deleted] Sep 21 '21 Also thought the same, but then " <= " ... So nop, last element will also get picked up 1 u/kallefrommalle Sep 21 '21 It shouldn't consider the last element before the last element and any arithmetic in the for loop condition has been forbidden by the CEO 1 u/mansdem Sep 21 '21 How are you so sure it was the CEO that forbade it
5
No. See the function gets x - 1
x - 1
0 u/kallefrommalle Sep 21 '21 Erm ok, then maybe the last element shouldn't be considered but they have a strict policy to never use math in for loop conditions. 2 u/[deleted] Sep 21 '21 Also thought the same, but then " <= " ... So nop, last element will also get picked up 1 u/kallefrommalle Sep 21 '21 It shouldn't consider the last element before the last element and any arithmetic in the for loop condition has been forbidden by the CEO 1 u/mansdem Sep 21 '21 How are you so sure it was the CEO that forbade it
0
Erm ok, then maybe the last element shouldn't be considered but they have a strict policy to never use math in for loop conditions.
2 u/[deleted] Sep 21 '21 Also thought the same, but then " <= " ... So nop, last element will also get picked up 1 u/kallefrommalle Sep 21 '21 It shouldn't consider the last element before the last element and any arithmetic in the for loop condition has been forbidden by the CEO 1 u/mansdem Sep 21 '21 How are you so sure it was the CEO that forbade it
2
Also thought the same, but then " <= " ... So nop, last element will also get picked up
1 u/kallefrommalle Sep 21 '21 It shouldn't consider the last element before the last element and any arithmetic in the for loop condition has been forbidden by the CEO 1 u/mansdem Sep 21 '21 How are you so sure it was the CEO that forbade it
1
It shouldn't consider the last element before the last element and any arithmetic in the for loop condition has been forbidden by the CEO
1 u/mansdem Sep 21 '21 How are you so sure it was the CEO that forbade it
How are you so sure it was the CEO that forbade it
View all comments
Show parent comment
-1
u/kallefrommalle Sep 21 '21
Maybe the first element shouldn't be considered?🤔