9
jkuhl
5y

It's been more than 3 years since ES6 came out.

Why are tutorials STILL coming out with people using "var" over "let" and "const"?

Var is dead folks.

Comments
  • 2
    it is actually a good thing
    so you can better smell bullshit from miles away instead of wasting time diggin into the tutorial 😂
  • 0
    Aaand you could practically use es6 in the browser (except for extending classes or modules usage, but there are libs) instead of transpiling it to a big messy blob you spent hours configuring because why not :D
  • 0
    @irene like Flash.
  • 0
    there's a good article supporting var rather than let
    https://davidwalsh.name/for-and-aga...
    i couldn't disagree more tho 😉

    we already have function scoped stuff: parameters FGS!!!

    otherwise we'll never get rid of the freaking closure problem. how beautiful, isn't it? stupid var...
    http://jsfiddle.net/thatsnotnice/...
  • 0
    I know what let and var are and how to use them but I keep using var in my projects because it's easier to read for most of people.
  • 1
    Let reads nicer. That is literally the only reason I'm using it. Sure, it sorts loads of problems with var but I was already dealing with that shit by default after all these years.
  • 1
    Var is not dead at all! You know that not all ES6 features are supported in all browsers out there, right? So, for web apps that require a high level of compatibility on many many different devices quite a lot of companies are still using older stuff, even in new development.
  • 0
Add Comment