JSFiddle - React, Tailwind, and code Playground
JavaScript
// Example of call();
// http://stackoverflow.com/questions/9964500/what-does-object-call-mean
var obj1 = {
property1: "blah",
method1: function () {
alert(this.property1);
// do stuff
}
};
function func1 (passedObject, passedFunction) {
passedFunction.call(passedObject);
// do other stuff
}
func1(obj1, obj1.method1);