Skip to content

Instantly share code, notes, and snippets.

@ZackMattor
Created April 30, 2016 19:37
Show Gist options
  • Save ZackMattor/b00d3e461b47a47b1e7d3b09c01aeb25 to your computer and use it in GitHub Desktop.
Save ZackMattor/b00d3e461b47a47b1e7d3b09c01aeb25 to your computer and use it in GitHub Desktop.
Testing spread in node
console.log('Testing spread operator...');
var tests = {
spread(a, b, c, d, e, f) {
console.log(a);
console.log(b);
console.log(c);
console.log(d);
console.log(e);
console.log(f);
}
};
var args = [1, 2, 3, 4]
tests.spread(...args, 5, ...args);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment