Quick notes on advanced ES2015 features

Jan 7, 2016

[Note: I found this blog post 5 months after I first wrote it. It is not finished to the standard that I originally planned but I decided I'd still rather publish it now than delete it.]

I first started programming JavaScript with vanilla ES5. I disliked it right from the start having grown accustomed to the nice syntax of Python and ended up switching to CoffeeScript for quite a while. However, around June of last year, I got interested in ES6/ES2015 again.

These are some of my notes from reading this book on ES6 features. I deliberately didn't write about anything I already found trivial, deciding to only focus on things I didn't already know. I never got to the end of the book but still decided to publish it.

New methods

function doSomething() {}
var doAnotherThing = function() {};
console.log(doSomething.name);      // "doSomething"
console.log(doAnotherThing.name);   // "doAnotherThing"


From: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators

Generators are just like Python generators.