Named Parameters function complex(name, priority, user, title) { … } complex( „Hannes Moser", undefined, null, „Mag.(FH)„ ) // I like this more complex({ name: "Hannes Moser", title: "Mag.(FH)" })
Clean Interfaces export default function pokemon() { function collect() { … } return {collect} } const pikachu = pokemon() pikachu.bad = function() { … } // no problem at all
Sources • ECMAScript® 2016 Language Specification • Douglas Crockford: The Better Parts • Axel Rauschmayr: 2ality.com, Exploring ES6 • Rebecca Murphy: Ain't No Party Like a Third-Party JavaScript Party • Snippets: https://github.com/eliias/the-magic-parts