Monday, December 9, 2019

TypeScript let keyword block scoping coolness in switch statements

One of the things the let scoping around if/then statement affords is that you may use a let variable with the same name in different cases of a case/switch statement if you just nest that variable's instantiation each time inside of a truthy/false check in an if statement.

No comments:

Post a Comment