Skip to content

Instantly share code, notes, and snippets.

View mthines's full-sized avatar
🍄
Feeling Fungi'

Mads Thines mthines

🍄
Feeling Fungi'
  • Dash0
  • Copenhagen, Denmark
  • 18:06 (UTC +01:00)
View GitHub Profile
@mthines
mthines / destructuring.js
Created September 10, 2018 07:02 — forked from mikaelbr/destructuring.js
Several demos and usages for ES6 destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];