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

you are viewing a single comment's thread
view the rest of the comments
[–] 34 points 1 year ago (3 children)

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.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 10 points 1 year ago (2 children)

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

  • source
  • parent
  • hideshow 2 child comments
  • [–] 5 points 1 year ago* (last edited 1 year 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.

  • source
  • parent