He asked about [1, 2, 3, 4, 5, 6] and not Array(7), is it the same?
it is essentially the same, I just pointed out what is a better comparison case with quote from the mdn docs
Your quote from MDN has nothing to do with the question though.
const arr =  and const arr = Array.of(7) will give exactly the same resut.
const arr = 
const arr = Array.of(7)
> const arr1 = Array(7);
> const arr2 = ;
> const arr3 = Array.of(7);
[ <7 empty items> ]
[ 7 ]
[ 7 ]
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.