JSFiddle - React, Tailwind, and code Playground

by rjzaworski

JavaScript

function callback (c, d, e, f) {
  console.log([c, d, e, f]);
}

function asyncWithCallbackArgs(obj, callback) {
  var args = Array.prototype.slice.call(arguments, 2);
  callback.apply(obj, args);
}

asyncWithCallbackArgs({}, callback,'c','d','e','f');