@HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish • edit-214 hours agoWhy make it complicated?lemmy.mlimagemessage-square74fedilinkarrow-up1256arrow-down10file-textcross-posted to: programmerhumor@lemmy.ml
arrow-up1256arrow-down1imageWhy make it complicated?lemmy.ml@HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish • edit-214 hours agomessage-square74fedilinkfile-textcross-posted to: programmerhumor@lemmy.ml
minus-square@Hotzilla@sopuli.xyzlinkfedilink3•edit-28 hours 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
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.