understanding-es6
understanding-es6 copied to clipboard
Simple examples to help you understand ES6
Added destructuring with defaults and with new variable names
Class expression might be added https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/class
Right now the examples are good, but the styles are a little all over the place. One approach would be to use a style guide and enforce it somehow e.g....
Current example uses property value shorthand, which is little confusing for anyone new to es6. This new example exactly shows how the object destructuring actually works.
References #26 This by no means perfect, but it's a start at least
Improves the arrow functions examples by demonstrating the lexical binding of `this` within arrow functions.
From the comment is not clear whether the scope changes or is bind to the caller (like _.bind does)
I wrote out an example that demonstrates the benefit of lexical binding when using arrow functions versus using regular functions
I thought it would be nice to point out that rest-params have native array methods since the one example shown demonstrates length which `arguments` also has even though it is...
There're no example to `extends` feature at _Class_ description.