I understand about JavaScript spread syntax in general. But in the following code, I cannot understand why it is used when creating a new array of specific length:
const createArray = length => [...Array(length)];
I understand about JavaScript spread syntax in general. But in the following code, I cannot understand why it is used when creating a new array of specific length:
const createArray = length => [...Array(length)];