mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Use the new operator with the Array constructor.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
function arrayMap(array, iteratee) {
|
||||
let index = -1
|
||||
const length = array == null ? 0 : array.length
|
||||
const result = Array(length)
|
||||
const result = new Array(length)
|
||||
|
||||
while (++index < length) {
|
||||
result[index] = iteratee(array[index], index, array)
|
||||
|
||||
Reference in New Issue
Block a user