JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://raw.github.com/documentcloud/underscore/master/underscore.js"></script>
JavaScript
var Cow = function(name) {
this.name = name;
}
Cow.prototype.moo = function() {
alert(this.name + ' moos');
}
var cow1 = new Cow('alice');
var cow2 = new Cow('bob');
cow1.moo(); // alice moos
cow2.moo(); // bob moos
aler(4);
var func = cow1.moo;
func(); // not what you expect since the function is called with this===window
_.bindAll(cow1, 'moo');
func = cow1.moo;
func(); // alice moos