Hey, I'm trying to create multiple div elements using a for loop in JavaScript. Here's the code snippet I have so far:

<script>
 for (let i = 0; i < 5; i++) {
  const div = document.createElement('div');
  div.textContent = `This is div ${i + 1}`;
  document.body.appendChild(div);
 }
</script>

The problem is that while this code does create div elements, they all stack on top of each other. I want them to appear side by side. Can anyone help me with this?