问题 This question already has answers here : JavaScript closure inside loops – simple practical example (44 answers) Closed 4 years ago . I'm learning some ES6 features and of course came across the let keyword and its new scope (differs from var ) and I came across an example about the tricky scope of var and its hoisting. but I can't fully understand why I get this result: var events = ['click', 'dblclick', 'keydown', 'keyup']; for (var i = 0; i < events.length; i++) { var event = events[i];