From a494e837d16d03bcd4326c706aee7b3c52525e83 Mon Sep 17 00:00:00 2001 From: Yash bhanushali <75803955+yashbhanu@users.noreply.github.com> Date: Wed, 5 Oct 2022 04:59:20 +0530 Subject: [PATCH] Update 106-explicit-binding.md (#2015) --- .../106-explicit-binding.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/content/roadmaps/106-javascript/content/111-javascript-this-keyword/106-explicit-binding.md b/content/roadmaps/106-javascript/content/111-javascript-this-keyword/106-explicit-binding.md index a2419f69d..71230cf89 100644 --- a/content/roadmaps/106-javascript/content/111-javascript-this-keyword/106-explicit-binding.md +++ b/content/roadmaps/106-javascript/content/111-javascript-this-keyword/106-explicit-binding.md @@ -1 +1,11 @@ -# Explicit binding \ No newline at end of file +# Explicit binding + +In this method, you can force a function to use a certain object as its this. Explicit Binding can be applied using call(), apply(), and bind(). + +call(): Pass in the required object as the first parameter during the function call. The actual parameters are passed after the object. + +apply(): Similar to call() with a difference in the way the actual arguments are passed. Here, the actual arguments are passed as an array. + +bind(): In this method, you create a new function with a fixed this. These types of functions created using bind() are commonly known as bound functions. + +Explicit Binding