JSFiddle - React, Tailwind, and code Playground

by ponyspy

JavaScript

function test(foo, params) {
  foo.apply(this, params);
}

function fun(a,b,c) {
  alert(a+b+c);
}

test(fun, [1,2,3]); // 6