title: Outputting directly to template with Embedded Javascript Syntax
body: <p>I'm using Backbone with Underscore templates. I have a JavaScript <code>if()</code> condition in my code that looks something like this:</p>
  
  <pre><code>&lt;div class='faces'&gt;
      &lt;% if(somevalue === true) { %&gt;
         your face
      &lt;% } else { %&gt;
         my face
      &lt;% } %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>However I find this syntax awkward and I really would like to use something like the following, even though it doesn't actually work (replaces entire document with the text):</p>
  
  <pre><code>&lt;div class='faces'&gt;
      &lt;% if(somevalue === true) { 
          document.write("your face");
      } else { 
          document.write("my face");
      }
  &lt;/div&gt;
  </code></pre>
  
  <p>I want the string to be output in the template exactly where it is called. For outputting a simple variable EJS (and underscore) have a great syntax of</p>
  
  <pre><code>&lt;%= somevalue %&gt;
  </code></pre>
  
  <p>Where the <code>=</code> is the critical part that <code>document.write()</code>s it out into the template. Is what I'm trying to accomplish possible? Can JavaScript output inline?</p>