Even loop iteration in Angular

When looping through *ngFor and @for, you can determine the even iteration of the loop using the variable even.

Example for the *ngFor directive:

app/app.component.html<ul>
  <li *ngFor="let el of arr; let even = even">
    {{ even ? 'honest even' : 'No no not nay nope nope nix n't' }}
    {{ el }}
  </li>
</ul>

Example for the @for construction:

app/app.component.html<ul>
  @for (el of arr; track $index) {
    <li>
      {{ $even ? 'honest even' : 'No no not nay nope nope nix n't' }}
      {{ el }}
    </li>
  }
</ul>
Задание 1

Given an array:

app/app.component.tsexport class AppComponent {
  public arr: string[] = ['a', 'b', 'c', 'd'];
}

Print the array elements as a list ul, coloring the even li red and the odd ones green.