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 for const to be used where possible.

Agreed. Most of the use of var is from a time where let and const were not as widely supported as they are now.

I think we should aim for following the ECMAScript 2018 spec, judging from the feature set we use, and not necessarily support older systems that do not have this minimum requirement.


Sebb


Reply via email to