<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Basic for loop example</title>
    <style>

    </style>
  </head>
  <body>

  <p></p>


    <script>
    const cats = ['Bill', 'Jeff', 'Pete', 'Biggles', 'Jasmin'];
    let info = 'My cats are called ';
    const para = document.querySelector('p');

    for(let i = 0; i < cats.length; i++) {
      info += cats[i] + ', ';
    }

    para.textContent = info;

    </script>

  </body>
</html>
