<!DOCTYPE html>
<html>
<head>
  <title>Loop</title>
</head>
<body>
  <h2>for...of Loop</h2>
  
  <script>
    
    const colors = ["red", "green", "blue"];
     for (let color of colors) {
         document.write(color, `<br>`);
     }
    
  </script>
</body>
</html>
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.