@merari42@lemmy.world to Programmer Humor@programming.dev • 25 days agoThe state should be purely passed through function inputs and outputslemmy.worldimagemessage-square127fedilinkarrow-up1954arrow-down16
arrow-up1948arrow-down1imageThe state should be purely passed through function inputs and outputslemmy.world@merari42@lemmy.world to Programmer Humor@programming.dev • 25 days agomessage-square127fedilink
minus-square@xmunk@sh.itjust.workslinkfedilink15•25 days agoJavascript: I heard you like mutating class data so I’m mutating the data you can put in your class data, dawg.
minus-squareZagorathlinkfedilink3•24 days agoTo be fair to JavaScript (I feel gross just saying that), it does have the ability to do some more functional-like programming as well. For example, many of its more recent array methods like filter, map, and reduce are pure functions.
Javascript:
I heard you like mutating class data so I’m mutating the data you can put in your class data, dawg.
JavaScript: a language for mutants.
To be fair to JavaScript (I feel gross just saying that), it does have the ability to do some more functional-like programming as well. For example, many of its more recent array methods like filter, map, and reduce are pure functions.