JSFiddle - React, Tailwind, and code Playground
HTML
<button type="button">click</button>
JavaScript
var checkObject = function() {};
checkObject.prototype = {
checkName:function(){
alert(1)
return this;
},
checkEmail : function(){
alert(2)
return this;
},
checkPassword : function(){
alert(3)
return this;
}
};
var a = new checkObject();
a.checkPassword();
a.checkEmail();
a.checkName().checkEmail().checkPassword();