'Lodash _.map method returns unexpected result when array provided instead of iteratee
When I have this array for example:
const x = [1, 2, 3]
and I try this:
_(x).map(x).value()
I'm getting this result:
[false, false, false]
Any reason why this is the output? map expectes to get a callback, and suppose to invoke the callback on each element the array has. I'm passing it an array instead, so what happens here?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
