There are 4 different ways to create sparse arrays in JavaScript
const justiceLeague = ["Superman", "Aquaman", , "Batman"]; console.log(justiceLeague); // ['Superman', 'Aquaman', empty ,'Batman']
const array = Array(3); console.log(array); // [empty, empty ,empty]
const justiceLeague = ["Superman", "Aquaman", "Batman"]; delete justiceLeague[1]; console.log(justiceLeague); // ['Superman', empty, ,'Batman']
const justiceLeague = ["Superman", "Aquaman", "Batman"]; justiceLeague.length = 5; console.log(justiceLeague); // ['Superman', 'Aquaman', 'Batman', empty, empty]