JSFiddle - React, Tailwind, and code Playground

JavaScript

var Foo = function() {
    
    this.bar = function(bazinga) {
        if (bazinga) {return this;}
        else {return false;}
    }
    this.show = function() {
        alert('bar');
    }
}; 

var foo = new Foo;

foo.bar(true).bar(true).bar(true).bar(true).bar(true).bar(true).show();    //works ok
foo.bar(true).bar(true).bar(false).bar(true).bar(true).bar(true).show();    //Error: Object #<error> has no method 'bar' 
////////////////////////////^^^^^false here