mudkip@lemdro.id to memes@lemmy.worldEnglish · 1 month ago123 + 456 = 123456files.catbox.moeimagemessage-square44linkfedilinkarrow-up1253arrow-down163
arrow-up1190arrow-down1image123 + 456 = 123456files.catbox.moemudkip@lemdro.id to memes@lemmy.worldEnglish · 1 month agomessage-square44linkfedilink
minus-squareslazer2au@lemmy.worldlinkfedilinkEnglisharrow-up155·1 month agoJS devs are like yep, that’s clearly concatenation of 2 strings.
minus-squarezxqwas@lemmy.worldlinkfedilinkarrow-up33arrow-down1·1 month agoBut for some reason 456 + 123 = Null.
minus-squarefarmgineer@nord.publinkfedilinkEnglisharrow-up12·1 month agoI came to complain about JS and see that I was beat to the punch
minus-squareLucy :3@feddit.orglinkfedilinkarrow-up9·1 month agoI mean everyone looking at that equation should think that
minus-squareslazer2au@lemmy.worldlinkfedilinkEnglisharrow-up4·1 month agoCompared to a type safe language where it would be an equation rather then concatenation.
minus-squaremacniel@feddit.orglinkfedilinkarrow-up8arrow-down1·1 month agoOnly when the first statement is a string already would that result in a string concat.
minus-squareZiglin (it/they)@lemmy.worldlinkfedilinkEnglisharrow-up1·1 month agoThey are implied to both being strings. As such the first one already is a string. Neither is marked as such in a standard way though.
minus-squareTomMasz@piefed.sociallinkfedilinkEnglisharrow-up6·1 month agoCame here for JavaScript mention, was not disappointed.
JS devs are like yep, that’s clearly concatenation of 2 strings.
But for some reason 456 + 123 = Null.
Wat
Mathematicians too
Gardeners too
I came to complain about JS and see that I was beat to the punch
I mean everyone looking at that equation should think that
Compared to a type safe language where it would be an equation rather then concatenation.
Only when the first statement is a string already would that result in a string concat.
They are implied to both being strings. As such the first one already is a string. Neither is marked as such in a standard way though.
Came here for JavaScript mention, was not disappointed.