Skip to content

Instantly share code, notes, and snippets.

View diemoritat's full-sized avatar
:octocat:
I may be slow to respond.

Nayara Alves diemoritat

:octocat:
I may be slow to respond.
View GitHub Profile
@diemoritat
diemoritat / destructuring.js
Created September 7, 2019 17:14 — forked from mikaelbr/destructuring.js
Complete collection of JavaScript 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];
@diemoritat
diemoritat / ES2015In20Minutes.js
Created March 20, 2018 17:15 — forked from danilosilvadev/ES2015In20Minutes.js
A quick guide to reference the ES06
//This gist is a fast reference to ES06 to whose already knows es05.
//I'm trying to use a different approach: first the example and after the explanation.
//Lesson 1: Template literals
console.log(`hello ${firstname},
how are you?`);
//Template literals are string literals with support for interpolation(using ${variable}) and multiple lines.