JSFiddle - React, Tailwind, and code Playground

JavaScript

function temp(a, b, c, d){
  console.log(a + b + c + d);
}

function partial(f){
    var defaultArgs = Array.prototype.slice.call(arguments, 1);
    var that = this;

    var tf = function(){
        f.apply(that, defaultArgs.concat(Array.prototype.slice.call(arguments)));
    }
    return tf;
}

var ff = partial(temp, 44, 55);
ff(20, 30);