JSFiddle - React, Tailwind, and code Playground
by huston007
JavaScript
var isSad = true;
Boolean.prototype.stop = function(){
isSad = false;
}
var sad = function(){
return isSad;
}
var beAwesome = function(){};
//вот тут и самое интересное.
console.log("Было грустно", isSad);
if (sad() === true){
sad().stop();
beAwesome();
}
console.log("Стало зашибись", isSad);