'var' and 'let' in Typescript 1.5
问题 This question was migrated from Software Engineering Stack Exchange because it can be answered on Stack Overflow. Migrated 4 years ago . What exactly is the difference between using either ' var ' or ' let ' in Typescript? I know that 'let' allows the variable to be defined further into a scope without it being used outside of said scope. That is obviously a nice advantage for iterators in for loops. I know this is an ES6 definition, so compiling to ES6 should look nearly identical in terms