canadalearningcode / llc-intro-to-browser-extensions

Intro to Browser Extensions with JavaScript
https://ladieslearningcode.github.io/llc-intro-to-browser-extensions/slides-en.html
Other
8 stars 10 forks source link

Loop type #7

Closed svinkle closed 6 years ago

svinkle commented 6 years ago

Thoughts on using for...of instead of the classic for loop? It's much easier to explain and understand.

Example, instead of:

for (var i = 0; i < allImages.length; i++) {
  console.log(allImages[i]);
}

We'd have:

for (var image of allImages) {
  console.log(image);
}

https://github.com/ladieslearningcode/llc-intro-to-browser-extensions/blob/4bce3f98ecc52c0a6aaee38933e1c6086a6c630d/slides-en.html#L1284

/cc @dmilliken @kasslent

svinkle commented 6 years ago

After going through the entire deck, I realize making this change would be a lot of work. Perhaps next year. 🙂

dmilliken commented 6 years ago

Hey! After code day I'm sure we'll have other revisions that we want to make to the deck, so cc Kass on any other ideas you have! :)