const arr = [4, 3, 2, 7, 8, 2, 3, 1];
let object = {};
object[arr[4]] = 0;
object[arr[3]] = 0;
object[arr[7]] = 0;
console.log(object)
Why are the keys of the object not in the chronological order? I thought the output would be something like this{0: 0, 1: 0, 2: 0}