tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

Replace var with let in javascript tutorials

Open andyjp94 opened this issue 5 years ago • 2 comments

I was wondering if there was appetite for changing the tutorials to use let instead of var? It behaves more like other programming languages people may be coming from and is now supported by all major browsers as per https://caniuse.com/#search=let with 90% full support in browsers and 94.5% including partial support.

Let me know if this would be appreciated and if so I'm happy to update the docs and raise the PR

andyjp94 avatar May 08 '19 19:05 andyjp94

We want to do a more in-depth refresh of the JavaScript tutorials and changing var to let would be a start, thanks.

brunogirin avatar May 09 '19 07:05 brunogirin

I'd be up for collaborating with someone on a separate 'ES6 Basics' course where we could include that sort of thing as well as arrow functions, template strings, spread operator, destructuring, etc. At least with a new course - or extra lesson - we can show the effects of changing your code from var to let and const, for example.

carlwood avatar Jun 06 '19 11:06 carlwood