1

For some reason this code is throwing a syntax error on line 5. What am I missing here? Help please!

<script type="text/template" id="question-template">
    <h1 class="headline"><%= title %></h1>
    <h2 class="subheadline"><%= question %></h2>
    <ul class="answers">
        <% _.each( answers, function( answer ) { %>
          <% if (answer.type == "input") { %>
          <li>
            <input type="number" placeholder="<%= answer.title %>">
          </li>
          <% }else{ %>
          <li><a class="answer" href="#question/<%= id+1 %>" <% if (typeof(answer.callback) !== "undefined") { %>onclick="<%= answer.callback %>"<% } %>>
            <%= answer.title %></a>
        </li>
          <% } %>
        <% }); %>
    </ul>
</script>
McGarnagle
  • 101,349
  • 31
  • 229
  • 260

0 Answers0