HiddenLayer555@lemmy.ml to Programmer Humor@programming.devEnglish · 8 months 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 · 8 months agomessage-square72linkfedilinkfile-text
minus-squaremasterspace@lemmy.calinkfedilinkEnglisharrow-up25arrow-down1·8 months 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·8 months agoIf there’s only two options you only need one keyword
minus-squareLemminary@lemmy.worldlinkfedilinkarrow-up1·8 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
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