HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-26 months agoWhy make it complicated?lemmy.mlimagemessage-square119fedilinkarrow-up1343arrow-down135file-textcross-posted to: programmerhumor@lemmy.ml
arrow-up1308arrow-down1imageWhy make it complicated?lemmy.mlHiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · edit-26 months agomessage-square119fedilinkfile-textcross-posted to: programmerhumor@lemmy.ml
minus-squarePsaldorn@lemmy.worldlinkfedilinkarrow-up9·6 months agoIf there’s only two options you only need one keyword
minus-squareLemminary@lemmy.worldlinkfedilinkarrow-up1·6 months agoAh, but this is JS, so there are three options! And they all function entirely differently. And your assumptions don’t apply, either. :D
minus-squareHotzilla@sopuli.xyzlinkfedilinkarrow-up5·edit-26 months agoTrue, but var and let are not same in js, so there is three. if(true) { var a = "dumdum" } console.log(a) Is valid and functioning javascript. With let it is not.
If there’s only two options you only need one keyword
Ah, but this is JS, so there are three options! And they all function entirely differently. And your assumptions don’t apply, either. :D
True, but var and let are not same in js, so there is three.
if(true) {var a = "dumdum"}console.log(a)Is valid and functioning javascript. With let it is not.