How to create a dynamic object in a loop? May 25, 2023 by Tarik var objects = {}; for (var x = 0; x < 100; x++) { objects[x] = {name: etc}; }