JSFiddle - React, Tailwind, and code Playground
JavaScript
function Person(name)
{
var that = this;
this.name = name;
this.sayName = function()
{
alert('My name is ' + that.name);
};
}
var p = new Person('Smith');
p.sayName(); // 'My name is Smith'
var q = p;
q.sayName(); // 'My name is Smith'
q = p.sayName;
q(); // 'My name is' ???