Skip to content

Instantly share code, notes, and snippets.

@CapsAdmin
Created July 2, 2019 14:57
Show Gist options
  • Save CapsAdmin/777d3c403e6c2c11c7cbb16d6acd3e44 to your computer and use it in GitHub Desktop.
Save CapsAdmin/777d3c403e6c2c11c7cbb16d6acd3e44 to your computer and use it in GitHub Desktop.
let tbl = {
foo: [1,2,3],
bar: [4,5,6],
}
let test = function(a,b,c) {
console.log(a,b,c)
}
/*
// this is what I want, but it doesn't work
let unpack = function(a) {
return ...a
}
test((...tbl.foo))
*/
//this works though
test(..tbl.foo) //should print 1,2,3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment