Re: Javascript uses var unnecessarily

2021-11-18 Thread Daniel Gruno
On 18/11/2021 12.12, sebb wrote: On Wed, 17 Nov 2021 at 17:47, sebb wrote: On Wed, 17 Nov 2021 at 17:20, Daniel Gruno wrote: On 17/11/2021 12.26, sebb wrote: There are lots of places where the Javascript code uses var when it should be using let (or const?) Is there any reason to keep the

Re: Javascript uses var unnecessarily

2021-11-18 Thread sebb
On Wed, 17 Nov 2021 at 17:47, sebb wrote: > > On Wed, 17 Nov 2021 at 17:20, Daniel Gruno wrote: > > > > On 17/11/2021 12.26, sebb wrote: > > > There are lots of places where the Javascript code uses var when it > > > should be using let (or const?) > > > > > > Is there any reason to keep the var

Re: Javascript uses var unnecessarily

2021-11-17 Thread sebb
On Wed, 17 Nov 2021 at 17:20, Daniel Gruno wrote: > > On 17/11/2021 12.26, sebb wrote: > > There are lots of places where the Javascript code uses var when it > > should be using let (or const?) > > > > Is there any reason to keep the var type for local variables? > > > > I think it would make it

Re: Javascript uses var unnecessarily

2021-11-17 Thread Daniel Gruno
On 17/11/2021 12.26, sebb wrote: There are lots of places where the Javascript code uses var when it should be using let (or const?) Is there any reason to keep the var type for local variables? I think it would make it easier to find errors if variables were scoped as tightly as possible. Also

Javascript uses var unnecessarily

2021-11-17 Thread sebb
There are lots of places where the Javascript code uses var when it should be using let (or const?) Is there any reason to keep the var type for local variables? I think it would make it easier to find errors if variables were scoped as tightly as possible. Also for const to be used where possibl