title: How can i use a variable defined in a partial in EJS?
body: <p>I am using EJS as my Express view engine, and I'm trying to 'expose' a variable in a partial so that I can use it in the *.ejs which 'include' it, but I don't know how to do it.</p>
  
  <pre><code>partial.ejs
  &lt;% var jsUrl = 'sth'; %&gt;
  
  test.ejs
  &lt;script tpye="text/javascript" src="&lt;%= jsUrl %&gt;"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>When I render test.ejs, I want to pass nothing to test.ejs.like:</p>
  
  <pre><code>res.render('test.ejs'); 
  </code></pre>
  
  <p>Instead, I want to use the variable which defined in the partial.
  Any help is appreciated.</p>