The Use of "var" In Basic JavaScript lessons

I’m not sure if this is the right place to post this, but I’ll put it here for now.

I noticed that the lessons on JavaScript basics on FCC use the var keyword and so far I haven’t come across one that has us use let or const (or at least I don’t remember one). Shouldn’t the lessons also use let or const? I think this should be addressed.

I agree FCC mostly uses var to declare variables. I guess (because i am also not sure why) because the lessons were developed (FCC was founded in 2014) before ECMAScript 2015 came out. Or probably because they want to keep the tutorials beginner-friendly by sticking to var to avoid confusing newbies with const and let.

I still think it’d be better to update the tutorials. There are good sites out that there that do teach about let and const to beginners. And it’s best practice to use them, too, so that’s why I think FCC should teach about them. But yeah, it’s ultimately it’s up to them. This is just a suggestion.

1 Like

FCC does teach let/const in the ES6 section, which yes, should be rolled up with the rest of the JS curriculum. The main reason it used older syntax back then was compatibility. Not all browsers would support let/const, and FCC more or less ran your code “naked” in a plain old eval without transpiling.

Nowadays it’s just because no one has had enough tuits to go round to change all the lessons. You can always take a stab at it:

1 Like

I might go there and make a suggestion to them to add the ES6 stuff to the rest of the JavaScript curriculum.

And yeah, it’s good to know there are ES6 lessons.

The suggestion’s been made, heard, and understood; there just isn’t enough time on everyone’s hands to make it happen. Such is life, especially these days where everyone’s life is getting turned upside down.

The majority of dev work is in the upcoming 7.0 curriculum, which will likely be released in the summer. Note I didn’t say the summer of what year. Portions of it like the new Python curriculum are slated to come out much sooner though.