Created
July 2, 2019 14:57
-
-
Save CapsAdmin/777d3c403e6c2c11c7cbb16d6acd3e44 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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