title: How to write a conditional if statement using underscore template
body: <p>I have a <code>Name</code> and <code>Status</code> fields on my table and I want to display the values, Active and Inactive for the Status field. Here is the template I'm using:</p>
  
  <pre><code>  &lt;tbody&gt;
  &lt;% _.each(accountLists, function(account) { if (account.active == 'true') ? 'Active': 'Inactive'%&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;%= account.active %&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;% }) %&gt;
  &lt;/tbody&gt;
  </code></pre>
  
  <p>When I run, the template throws: </p>
  
  <pre><code>Uncaught SyntaxError: Unexpected token 
  </code></pre>
  
  <p>Why?</p>
  
  <p>For reference, below is my accountView.js </p>
  
  <pre><code>var AccountList = Backbone.View.extend({
  
          initialize: function(){
  
  },
  
      el:'#sub-account-list', 
      render: function(id){
  
      var self = this;
          var accountList = new SubAccountCollection([],{ id: id });
  
          accountList.fetch({
          success: function(accountLists){
  
              var data = accountLists.toJSON();
              var accounts = data[0].data.items;
              var template = $("#sub-account-list").html(_.template(tmpl, {accounts:accounts}));
  
                  },
              });
          }
      });
  </code></pre>