4 ms·let top5 = Array(5).fill({ idx: 0, count: 0, }); ...this kind of code is nice source of bugs in js.by mirekrusin 3y agolet top5 = Array(5).fill({ idx: 0, count: 0, }); ...this kind of code is nice source of bugs in js.lib-dev 3y agoHow?fyzix 3y agoBecause it uses the same object for all items in the array. Luckily, they are just placeholders and aren't being mutated.lib-dev 3y agoAh interesting. I see it now. Thanks for the reply.