title: Can I assign to a jade variable from inside javascript?
body: <p>I've seen tons of questions the other way around, but can't find one for assigning to.</p>
  
  <p>So, why can I do this:</p>
  
  <pre><code>var username = '#{username}';
  </code></pre>
  
  <p>But not this?</p>
  
  <pre><code>#{username} = username;
  </code></pre>
  
  <p>Is there a way to assign to jade variables from inside javascript? </p>
  
  <p>Edit: I ended up doing what Bigood suggested and using server and client side cookies, that works great! I followed a guide that I found from here <a href="https://stormpath.com/blog/everything-you-ever-wanted-to-know-about-node-dot-js-sessions/" rel="nofollow">https://stormpath.com/blog/everything-you-ever-wanted-to-know-about-node-dot-js-sessions/</a></p>