JSFiddle - React, Tailwind, and code Playground

by denisz

JavaScript

function bind(fn, context) {
    return function (...args) {
        fn.apply(context, args);
    }
}
var a = bind(function() {console.log(this)}, {a: 1});
a();