dominik wagner

let value of values

Nicholas C. Zakas on ECMAScript 6:

var values = [1, 2, 3, 4, 5, 6];
for (let value of values) {

This makes complete sense to me. The syntax is very similar to the already existing for and for-in loops and mimics what’s already available with Array.prototype.forEach().

I was quite unaware that javascript is getting new syntax. If you are too, this article might be enlighting. However, I already hate the existence of a for-of besides a for-in loop. If you like making fun of javascript, you might enjoy this short talk by Gary Bernardt.

<< Ideas Off-putting and vaguely insulting >>