Challenge: Bind Function
This challenge will test your understanding of rest parameters and their use in implementing the "bind" function in JavaScript.
We'll cover the following
Problem statement #
Create a function, bind
, that is equivalent to Function.protototype.bind
.
Function.protototype.bind
returns a new function whose this
value can be set to the value provided during the function call. Hence, it enables calling a function with a specified this
value (the first parameter to bind
function).
Here is an example of how we are using our bind
function in the testing widget below:
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.