JSFiddle - React, Tailwind, and code Playground
by Alexander Tymchuk
JavaScript
if (typeof Function.prototype.bind === 'undefined') {
Function.prototype.bind = function () {
var fn = this,
context = arguments[0],
args = Array.prototype.slice.call(arguments, 1);
return function () {
return fn.apply(context, args.concat([].slice.call(arguments)));
}
}
}
window.log = function () {
var args = Array.prototype.slice.call(arguments);
console.log.apply(console, args);
};
window.log('Hi', ' there!');
// fn.bind(context, args);
//Framework.bind(fn, context, args);
// [].slice(index, [count]);