Made with KolourPaint and screenshots from Kate (with the GitHub theme).

  • @masterspace@lemmy.ca
    link
    fedilink
    English
    2914 hours ago

    Yeah, 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.

    • Psaldorn
      link
      fedilink
      814 hours ago

      If there’s only two options you only need one keyword

      • @Hotzilla@sopuli.xyz
        link
        fedilink
        3
        edit-2
        8 hours ago

        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.