title: 'var' and 'let' in Typescript 1.5
body: <p>What exactly is the difference between using either '<strong>var</strong>' or '<strong>let</strong>' 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 of 'var' and 'let'. </p>
  
  <p>But, when it compiles down into ES5 javascript which doesn't support 'let', what exactly is happening? Are there oddly named variables that the compiler creates so that it prevents using said variables in the context of the Typescript file? What happens in situations where you define many 'let' variables throughout a function? Is there a performance impact I should be concerned about?</p>
  
  <p>Basically, <strong>what is happening when typescript compiles let variables to ES5 javascript?</strong></p>