The _.times() function in underscore.js is used to call the function a particular number of times i.e. execution of a function(f) “n” number of times.
Note: It is very necessary to link the underscore CDN before going and using underscore functions in the browser. When linking the underscore.js CDN link, the “_” is attached to the browser as a global variable.
Parameters:It takes following parameters:
- n: It tells how many times a function is needed to be executed.
- iteratee : It is a function that is to be invoked n times.
Return Value: It produces an array of returned values and this array is returned by the function.
- How to repeat HTML element multiple times using ngFor based on a number?
- How to get the function name inside a function in PHP ?
- p5.js | nfs() Function
- PHP | next() Function
- p5.js | nf() Function
- p5.js | nfp() Function
- p5.js | nfc() function
- PHP | Ds\Set xor() Function
- D3.js zip() Function
- p5.js | int() function
- D3.js | d3.map.get() Function
- D3.js | d3.max() function
- p5.js | mag() Function
- p5.js | str() function
- PHP | pow( ) Function
- p5.js | second() function
- CSS | var() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.