Skip to content

Instantly share code, notes, and snippets.

View clintwine's full-sized avatar

Ago Ugo clintwine

View GitHub Profile
@clintwine
clintwine / es6.js
Created October 31, 2017 09:26 — forked from anonymous/es6.js
es6 created by clinttwine - https://repl.it/NXGr/7
//spread operator -- takes an entry and spreads it
let a = [30, 40, 50]
let b = [10, 20, ...a, 60, 70]; //[ 10, 20, 30, 40, 50, 60, 70 ]
let m = { a: 1, b: 2, c: 3}
let n = { d: 1, e: 2, f: 3}
let c = {...m, ...n} // { a: 1, b: 2, c: 3, d: 1, e: 2, f: 3 }
//Rest Operator
//*****************************************************