@[email protected] to Programmer [email protected] • 2 months agoThe state should be purely passed through function inputs and outputslemmy.worldimagemessage-square112fedilinkarrow-up1943
arrow-up1943imageThe state should be purely passed through function inputs and outputslemmy.world@[email protected] to Programmer [email protected] • 2 months agomessage-square112fedilink
minus-square@[email protected]linkfedilink15•2 months agoJavascript: I heard you like mutating class data so I’m mutating the data you can put in your class data, dawg.
minus-squareZagorathlinkfedilink3•2 months 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.