Assuming I have this code below:
const list = [22, 13, 17, 11, 0];
let obj = {};
for (let val of list) {
obj[val] = false;
}
console.log(obj);
The result is:
{
0:false,
11:false,
13:false,
17:false,
22:false
}
It re-arranges the original order in the list. How do I stop it from doing so?