title: Generate an array with random data without using a for loop
body: <p>I am using the <code>faker.js</code> library to generate random data and I have a couple of factory functions that generate a series of user data:</p>
  <pre><code>const createUser = () =&gt; {
    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) =&gt; {
    return Array(numUsers).fill(createUser());
  };
  
  let fakeUsers = createUsers(5);
  console.log(fakeUsers);
  </code></pre>
  <p>The problem with this <code>Array.fill</code> approach is that it returns the same data <code>n</code> number of times. I want <code>5</code> different users to be returned from my factory.</p>
  <p>How do I do this?</p>