Tag Info

New answers tagged

1

As Doc Brown says, this is a fluent interface, and is easily achievable in javascript, to use your example: Number.prototype.sqrt=function(){return Math.sqrt(this);}; Number.prototype.floor=function(){return Math.floor(this);}; String.prototype.alert=function(){alert(this);return this;} (5).sqrt().floor().toString().alert(); //alerts "2"



Top 50 recent answers are included