JSFiddle - React, Tailwind, and code Playground

JavaScript

const array = [0, 1, 2];
array[4] = 4;
console.log(array[3]);
// At the third index the array will get the value "undefined", because the value - 4 will be placed at the fourth index and the code will not jump to the third index

console.log(array.length);