Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Benutzername55947dPerfect implementation out of the corporate code monkeys handbook. 10/10
junon291347dHow would a loop solve this? How would a reducer solve this?
Aside from the +=, this is perfectly reasonable and understandable code, and I would imagine it's much more performant than using any fancy control logic.
ninjasloth5047dAssuming all the other ratings will always be available, as soon as the first one is present... 😂
IntrusionCM471146dHow about... Just this crazy idea...
We use... Objects.
I know... Crazy.
And now. Deep breath! Darum dum dum....
Yeah. Dope shit. Right?
And if we put the object in the function, do not modify it, and return the correct value...
No iffies. No elsies. Nothing like that.
We could even do fancier stuff, but right now. Start there.
C0D46250946dIs no one else getting that urge to fix the spacing at the comma ,it's really grinding my gears right now.
Lensflare203246dNah, loops are too complicated. Nobody can comprehend what they are doing.
Reducers? No, no, no. That is devilish witchcraft.