HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · 1 year agoWhy make it complicated?lemmy.mlimagemessage-square72linkfedilinkarrow-up1266arrow-down134file-text
arrow-up1232arrow-down1imageWhy make it complicated?lemmy.mlHiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · 1 year agomessage-square72linkfedilinkfile-text
minus-squaremasterspace@lemmy.calinkfedilinkEnglisharrow-up25arrow-down1·1 year agoYeah, it’s explicitly distinct from const a: String which says it won’t change, and var a: String, which means this is legacy code that needs fixing.
minus-squarePsaldorn@lemmy.worldlinkfedilinkarrow-up6·1 year agoIf there’s only two options you only need one keyword
minus-squareLemminary@lemmy.worldlinkfedilinkarrow-up1·1 year agoAh, but this is JS, so there are three options! And they all function entirely differently. And your assumptions don’t apply, either. :D
Yeah, it’s explicitly distinct from
const a: Stringwhich says it won’t change, andvar a: String, which means this is legacy code that needs fixing.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