How to pass Jekyll variable in JavaScript function

Never mind this seem to work!

{% for tag in unique_tags %}
  <button type="button" id="{{ tag }}" onclick="filterByTags('{{ tag }}')">{{ tag }}</button>
{% endfor %}
2 Likes