While declaring an array, the JavaScript ignores the last empty/undefined element.
What could be the logic and reason behind such implementation in JavaScript language?
(function guessOutput () {
'use strict';
var array1 = [,,undefined,];
var array2 = [,,undefined];
console.log(array1.length === array2.length); // returns true. Why?
})();