Fixed 'JavaScript 1.7's let expressions are deprecated' errors

JavaScript 1.7's let expressions are deprecated https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#Non-standard_let_extensions