Your colleague asked you for help.
Let’s help him finish the script.
When the button is pressed, the inner text of the paragraph must be supplemented with the next array element.
A comma and a space must be added before the new element.
When all the items have been added, clicking on the button should do nothing.
Modify the already added script.

This task is part of the Full-Stack JavaScript Course
If you have any issues with it, you can ask for community help below the post
Feel free to help others if you’ve already solved the task

index.html

<!DOCTYPE html>
<html>
  <head>
    <title>Hidden numbers</title>
  </head>
  <body>
    <p></p>
    <button>Show next number</button>
    <script>
      const numbers = [1, 2, 3, 4, 5];
      const paragraph = document.querySelector('p');
      const currentIndex = 0;
      paragraph.innerHTML = numbers[currentIndex];
    </script>
  </body>
</html>