Bringing JavaScript into this decade
Ecma International is an industry association founded in 1961, dedicated to the standardization of information and communication systems.
Sorta like how English is the language, but there are eleventybillion dialects (how many different ways can you say the plural you? Y'all, Youins, You's, You's Guys, etc.)
var foo = "something";
const foo = "something";
let bar;
bar = "something else";
Two new keywords:
Prefer const unless you have a good reason to use let.
function blah() {
return "blah";
}
blah() {
return blah;
}
blahs.forEach(function(blah) {
return "I can't even " + blah;
});
blahs.forEach(blah => {
return "I can't even " + blah;
});
blahs.forEach(blah =>
"I can't even " + blah;
)
blahs.forEach(function(blah) {
return "I can't even " + blah;
});
blahs.forEach(blah => {
return "I can't even " + blah;
});
blahs.forEach(blah =>
"I can't even " + blah;
)
Unlike function, arrows share this with their surrounding code (which means no more of that stupid .bind() bs.
Well, mostly...)