I am encountering a persistent error while working on this. Specifically, I keep receiving an error related to syntax:
syntax error var _p=[],print=function(){_p.push.a... ');}return __p.join('');
<script id="product" type="text/template">
<p><span>items</span><span class='items'><%= _.each(info.items, function(books) { %>
<%= books.name + ", " %>
<% }); %></span></p>
</script>
I'm unsure as to why this error is occurring. After comparing with others who are utilizing the same style, everything seems correct. However, there might be some symbol that I'm overlooking?
Note: Issue resolved.
The problem was due to a misplaced =
sign in my code.
<%= _.each(info.items, function(books) { %>
it should be:
<% _.each(info.items, function(books) { %>
I'm uncertain about the necessity of the =
in certain sections and its absence in others. Perhaps someone can provide insight.
For instance, in this section of the code, a =
sign is required :
<%= books.name + ", " %>