GamerBoy705@lemmy.worldM to Software Gore@lemmy.worldEnglish · 10 months agoYes but nolemmy.worldimagemessage-square16fedilinkarrow-up1351arrow-down18file-text
arrow-up1343arrow-down1imageYes but nolemmy.worldGamerBoy705@lemmy.worldM to Software Gore@lemmy.worldEnglish · 10 months agomessage-square16fedilinkfile-text
minus-squareCommanderCloonlinkfedilinkarrow-up11·edit-210 months agoDepends on the language though, sometimes 5 == "5" and 5 !== "5" (PHP & JS) My guess is that a .trim() is missing somewhere Edit: removed typo in example code
minus-squarebleistift2@feddit.delinkfedilinkEnglisharrow-up3·10 months ago 5! == “5” (PHP & JS) is not valid in either PHP or JS
minus-squareCommanderCloonlinkfedilinkarrow-up1·edit-210 months agoThank you for pointing it out! That’s my bad, that was a typo, I meant 5 !== "5" (it’s the counterpart to the === comparator in both PHP & JS)
Depends on the language though, sometimes
5 == "5"
and5 !== "5"
(PHP & JS)My guess is that a
.trim()
is missing somewhereEdit: removed typo in example code
is not valid in either PHP or JS
Thank you for pointing it out! That’s my bad, that was a typo, I meant
5 !== "5"
(it’s the counterpart to the===
comparator in both PHP & JS)deleted by creator