I try to write a simple program to change color of a divs in a container every time i click.. on the first click it only changes color to on Div 1 ,Div 3,Div 5. on the second click it does Vice versa,

```html
<!doctype html>
<html lang="en">

<head>
  <!-- Required meta tags -->
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>clciks</title>
</head>

<body>
  <div id="container">
    <div>This is Div 1</div>
    <div>This is Div 2</div>
    <div>This is Div 3</div>
    <div>This is Div 4</div>
    <div>This is Div 5</div>
  </div>
  <script>
    let x = document.getElementById("container");
    let y = x.children;
    let click = 0;

    function myFunction() {
      for (let i = 0; i < y.length; i++) {
        y[i].onclick = function() {
          if (click == 0) {
            y[i].style.color = "blue";
            click = 1;
          } else {
            y[i].style.color = "red";
            click = 0;
          }
        }
      }
    }
    myFunction();
  </script>
</body>

</html>
```