Underscore.js _.tap() Function
Parameters: It accepts two parameters which are specified below:
- object: It is the object stated.
- interceptor: It is the function to be called.
Return Value: This method returns the object.
[4, 5, 6, 7, 8]
["a", "b", "c"]
3, 6, 9 // Result of filter function [9, 36, 81] // After tap method map function is performed
Here, the map function is applied on the intermediate results as obtain by filter method.
Please Login to comment...