I'm new at Javascript. I have the following code html:

```
<body>
    <ul id="a" class="list1">
    <li>Coffee</li>
    <li>Tea</li>
  </ul>
  <ul id="b" class="list2">
    <li>Coffee</li>
    <li>Tea</li>
  </ul>
  <script type="text/javascript">      
  </script>
</body>

```

How to color the text for each last li tag in the ul tags below? I was thinking of setting id for each li tag then using getElementById() method but that is quite wordy. Is there any other way without changing the structure of the html code? Can use Jquery but I don't know much about it.

Thanks for your help.

[enter image description here](https://i.stack.imgur.com/KnNTm.png)