![]() |
With the help of _.iterators.map() method, we can get the function of the new iterator which will return the value of the unary function which uses the values of the List iterator by using this method. Syntax: _.iterators.map(iter, unaryFn) Return: Return the value from the new iterator function. In the examples given below we are just showing the implementation part, you can use it anywhere as you want. Note: To execute the below examples you have to install the underscore-contrib library by using this command prompt we have to execute the following command. npm install underscore-contrib Example 1: In this example, we can see that by using _.iterators.map() method, we are able to get the value from the new iterator function which uses the unary function to generate values by using this method. javascript
Output : 'Geeks' 'for' Example 2: javascript
Output: 'A1' 'ABA3' 'ABCBA5' |
Reffered: https://www.geeksforgeeks.org
JavaScript |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 9 |