JSFiddle - React, Tailwind, and code Playground
by mifeng
HTML
<div id="debug">
</div>
JavaScript
var $debug = document.getElementById("debug");
Function.prototype.property = function() {
var args = Array.prototype.slice.call(arguments),
fn = this;
fn.a = args[0];
fn.b = args[1];
//return this.bind({a: args[0], b: args[1]});
return fn;
};
var word = {
c : "world",
chars: function(d) {
return this.a + " => " + this.b + ", " + this.c + ", " + d;
}.property('a', 'b')
};
console.log(word);
$debug.textContent = word.chars("v");