The signature for the function you pass as the first argument to .reduce is
(accumulator, currentValue, currentIndex, array) => {...}
The second argument you can pass to reduce is the starting value for the accumulator.
In your case, (x, y) => x.length + y.length is trying to get the length of the accumulator, named x, which will be undefined, and add it to the length of the first array in the parent array.
When you try to add undefined to a number, you get NaN.
My guess is that you're trying to calculate the aggregate length of all the arrays in your parent array? If so, try this...
[[],[],[],[]].reduce((acc, array) => acc + array.length, 0)
// returns 0
[[2, 3], [2, 3], [3, 5], [5, 6]].reduce((acc, array) => acc + array.length, 0)
// returns 8
[[], [], [], []].reduce((x, y) => x.length + y.length)is not working because you are returning an integer value and not an array. So in second iteration, it will fail as number does not have.length