Skip to content

Testing ES6 #18

@mydigitalself

Description

@mydigitalself
// ES5: Reusing the same loop variable name is bad
var counter = 0;
for(var i = 0; i < 3; i += 1) {
  for(var i = 0; i < 3; i += 1) {
    counter += 1;
  }
}

console.log(counter); // Oops, prints "3"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions