JSFiddle - React, Tailwind, and code Playground

by Nir Azuelos

JavaScript

// Constructor Function
function Tester() {
    this.options = {
        foobar: 10
    }
}

// A new instance (options.foobar = 10);
var instance = new Tester();

// A newly bound function that alerts options.foobar;
// Currently options.foobar = 10;
var bound = function() {
    alert(this.options.foobar);
}.bind(instance);

// (options.foobar = 20);
instance.options.foobar = 20;

// Will alert what?
bound();