JSFiddle - React, Tailwind, and code Playground
HTML
<h1 id="log">Waiting 2 seconds ...</h1>
CSS
body {
font-family: helvetica, arial;
}
JavaScript
var myNumber = 10;
var logStuff = function(adder, multiplier){
// `this` is myNumber because we bound it.
var sum = this + adder;
var product = this * multiplier;
$('log').set('text', 'sum: ' + sum + ', product: ' + product);
};
logStuff.delay(2000, myNumber, [10,4]);