Insert icon into list

{% for top_level_page in top_level_pages %}
  <a href="{{ top_level_page.url }}">{{ top_level_page.title }}</a>
  {% if top_level_page.isLast() == false %}
    <i class="fa fa-arrow-right"></i>
  {% endif %
{% endfor %}

what is wrong with that piece of code?

I want to add an icon between each pair of links. and NOT to the end…

You should use the Twig loop.last rather than thePage.isLast() method:

thank you. it works this way.