Skip to content

Instantly share code, notes, and snippets.

View dmjcomdem's full-sized avatar
🎯
Focusing

Dimonskiy dmjcomdem

🎯
Focusing
View GitHub Profile
@dmjcomdem
dmjcomdem / destructuring.js
Created October 23, 2017 12:41 — 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];