Why is the map() not being invoked here?
let N = 16;
let fullSizeBufs = Array(2).map((x) =>
Array(N).fill(-1)
)
console.log(fullSizeBufs)
We get
[undefined, undefined]
I even put a breakpoint on the Array(N).fill(-1) : it is not hit. The map() is just skipped. What is the correct syntax for this?
code snippet: I'll try to pick up that little skill!Array.from({ length: N }, () => -1)as well