Generate an array with random data without using a for loop
问题 I am using the faker.js library to generate random data and I have a couple of factory functions that generate a series of user data: const createUser = () => { return { name: faker.name.findName(), email: faker.internet.email(), address: faker.address.streetAddress(), bio: faker.lorem.sentence(), image: faker.image.avatar(), }; }; const createUsers = (numUsers = 5) => { return Array(numUsers).fill(createUser()); }; let fakeUsers = createUsers(5); console.log(fakeUsers); The problem with this