Код: Выделить всё
const arr = ["1", "2", "3"]
arr[arr.length] = "4" // Will add to end of array
console.log(arr) // ["1", "2", "3", "4"]
arr[this.length] = "5" // Will behave strangely
console.log(arr) // ["1", "2", "3", "4", undefined: "5"]Подробнее здесь: https://stackoverflow.com/questions/793 ... javascript