Why do I keep encountering this error message: Uncaught SyntaxError: missing ) after argument list (at bestellen:60:105)
This is the HTML code causing the issue:
<div class="gerechten">
{% for gerecht in gerechten %}
<div class="Gerechtdiv">
<img src={{gerecht.url}} class="gerechtimg">
<h3 class="GerechtTitel">{{gerecht.gerecht}}</h3>
<p class ="GerechtBeschrijving">{{gerecht.beschrijving}}</p>
<div class ="BottomGerechtDiv">
<p style="font-size: 17px;"><b>€{{gerecht.prijs}}</b></p>
<p>{{gerecht.sterren}}★</p>
</div>
<button class="button" onclick="addItemToCart({{gerecht.gerecht}}, {{gerecht.prijs}})" style="cursor: pointer"><span>Add to Cart</span> </button>
</div>
{% endfor %}
</div>
The error message specifically points to the line with the button element.
I attempted removing the onclick function, which resolved the error temporarily, but as soon as I reintroduce the function, the error reappears.