All posts tagged bindall

Understanding bind and bindAll in Backbone.js

It all starts with apply

Function bindAll internally uses bind . And bind internally uses apply. So it is important to understand what apply does.

var func = function beautiful(){
  alert(this + ' is beautiful');

If I execute above code then I get [object window] is beautiful. I am getting that message because when function is invoked then… Read the rest