JSFiddle - React, Tailwind, and code Playground
by dirtyd77
JavaScript
window.name = 'shit';
var makeMeBeautiful = { name: 'Chicago' };
var BeautifulThing = function () {
this.youAre = this.name + ' is so beautiful... to me!';
return this;
};
(function () {
// call BeautifulThing with makeMeBeautiful as this
// and store that resulting function in var chicago
var chicago = BeautifulThing,
// call chicago() and store string in song
song = chicago();
console.log(song, song.youAre);
// => Chicago is so beautiful... to me!
})();