Functions are objects in JavaScript, functions have methods, including the powerful Apply, Call, and Bind methods. Apply and Call are nearly identical and are frequently used in JavaScript for borrowing methods and for setting the this value explicitly. Apply and Call are ECMAScript3 but Bind is available in ECMAScript5 Bind() and borrow methods We use bind when we use the this keyword in a method and we call that … Continue reading When to Apply, Call and Bind
Category: Web
Mastering “this”
The Preface The this keyword has always been confusing to me when I first started to write Javascript. When it comes to Javascript, this in different scope can mean something else. So lets try to understand it once and for all and hopefully you can walk away feeling completely satisfied that you have mastered this … Continue reading Mastering “this”