title: Problem with html templating using express
body: <p>Hey guys i have a problem with EJS and express for changing my html file  I am trying to get user data through a form in html like this:-</p>
  <pre><code>&lt;form action=&quot;/&quot; method=&quot;post&quot;&gt;
   &lt;input type=&quot;text&quot; placeholder=&quot;Your new task&quot; name=&quot;newTask&quot;&gt;
   &lt;button type=&quot;submit&quot;&gt;Add&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  <p>This form sends back the data to the home route or (the root) so i am trying to get the day in the server using :-</p>
  <pre><code>app.post(&quot;/&quot;,(req,res)=&gt;{
      var task = req.body.newTask;
      tasks.push(task);
      res.redirect(&quot;/&quot;);
  });
  </code></pre>
  <p>And then this data i am pushing it to  a array called tasks and that task using EJS features i am sending it back to the html file through this :-</p>
  <pre><code>   res.render(&quot;list&quot;,{
          kindOfDay:dayOfWeek,
          addedTasks:tasks,
      });
  </code></pre>
  <p>And the above code sends this data to the html file and the data is rendered in html like this :-</p>
  <pre><code>&lt;h1&gt;&lt;%=kindOfDay%&gt;&lt;/h1&gt;
  &lt;ul&gt;
      &lt;li&gt;Buy food&lt;/li&gt;
      &lt;li&gt;Cook food&lt;/li&gt;
      &lt;li&gt;Eat food&lt;/li&gt;
    &lt;% for(var i=0; i&lt;addedTasks.lenght ; i++) { %&gt;
        &lt;li&gt;&lt;%= addedTasks[i] %&gt;&lt;/li&gt;
   &lt;% } %&gt;
  &lt;/ul&gt;
  </code></pre>
  <p>Everything is working fine expect 'addedTasks'. If i type in something it is not getting displayed,Thank you.</p>