* The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of resul
(n, iteratee)
| 148 | * @returns {Array} Returns the array of results. |
| 149 | */ |
| 150 | function baseTimes(n, iteratee) { |
| 151 | let index = -1; |
| 152 | |
| 153 | const result = Array(n); |
| 154 | |
| 155 | while (++index < n) { |
| 156 | result[index] = iteratee(index); |
| 157 | } |
| 158 | return result; |
| 159 | } |
| 160 | |
| 161 | /** |
| 162 | * The base implementation of `_.values` and `_.valuesIn` which creates an |