DEV Community

Discussion on: Should You Truly Never Use var?

Collapse
 
denishowe profile image
Denis Howe

Does any language apart from JavaScript distinguish between function scope and other block scopes? Why should JavaScript retain a special keyword to make that distinction (other than as a memorial to historical implementation details)? Someone who is incapable of working out the scope of a let variable will probably not understand var either.