Skip to content

Instantly share code, notes, and snippets.

View BrendanNeufeld's full-sized avatar

Brendan Neufeld BrendanNeufeld

  • github.com/rangle
View GitHub Profile
@neo
neo / ES2015.js
Last active July 27, 2017 21:57
Key ES2015 Features
function takesNamedParameters({ id, name } = {}) {
console.log(id, name);
}
// Rest parameters
function variadic(a, b, ...theArgs) {
return Array.isArray(theArgs); // true
}
let ary = [1, 2, 3, 4];
// Default function parameters