title: how can I use javascript in .hbs handlebars files?
body: <p>I have an .hbs file and in this file I can access the username by typing <code>{{username}}</code>.
  Now I add a script tag to my .hbs file (like adding script tags to html files) and I want to write javascript in this tag. I have tested:</p>
  
  <p><code>alert(5);</code></p>
  
  <p>and it worked. Now I want to access the <code>{{username}}</code> variable in my script tag but typing <code>{{username}}</code> doesn't return the username. How can I access this variable?</p>
  
  <pre><code>{{username}}
  
  &lt;script type="text/javascript"&gt;
  
  var temp = Handlebars.compile('{{username}}');
  
  var username = temp({});
  $.getJSON("http://localhost:3000/users/"+ username +"/summary.json", function (data) {
      num= data.topics[0].id;
  });
  
   &lt;/script&gt;
  </code></pre>
  
  <p>I want to print the num variable in my .hbs file near {{username}} but I don't know how ?</p>