JSFiddle - React, Tailwind, and code Playground

by xonev

HTML

<p>
</p>

JavaScript

try {
function test(thing, otherthing) {
    this.thing = thing;
    this.otherthing = otherthing;
}

var things = {};
test.call(things, "value 1", "value 2");
$('p').append(things.thing + " " + things.otherthing);

test.apply(things, ["value 3", "value 4"]);
$('p').append(things.thing + " " + things.otherthing);
} catch (e) {
    alert(e.message);
}