JSFiddle - React, Tailwind, and code Playground
by Jessie Lau
HTML
spread(someFunction, [1, true, "Foo", "bar"] )
// is the same as...
someFunction(1, true, "Foo", "bar")
JavaScript
function spread(func, args) {
return func(args);
}
console.log(spread(function(x,y){return x+y}, [1,2]));