The _.wrap() method of Function in lodash is used to create a function that delivers value to the stated wrapper like its initial argument. Moreover, any further arguments delivered to the function are added to those which are delivered to the stated wrapper.
- The wrapper used here is called with the this binding of the function formed.
Parameters: This method accepts two parameters as mentioned above and described below:
- value: It is the value to be wrapped.
- wrapper: It is the wrapper function.
Return Value: This method returns the new function.
<b>GfG, geeks, & GeeksforGeeks</b>