Adding dividers between list items in the menu.html.twig template
See The Loop Variable in the Twig docs; you can use something like

{% if loop.last == false %}
  &lt;li class="topbar-devider"&gt;&lt;/li&gt;
{% endif %}