title: Rendering elements classname in client-side without JS framework? (EJS)
body: <p>Let's say I have an app which shows to the users a list of existing hobbies.<br>
  Each hobby has a category, stored in the db.<br>
  I want every hobby element to have its background color - dependent on its category.<br>
  I want to implement this with appending specific class to each element.<br>
  Basic example code:<br>
  <strong>Server</strong>  </p>
  
  <pre><code>app.get("/hobbies", (req, res) =&gt; {
      const hobbies = Hobby.getAllHobbies();  
  
      res.render("hobbies", hobbies);
  });
  </code></pre>
  
  <p><strong>Client (EJS)</strong>  </p>
  
  <pre><code>&lt;% hobbies.forEach(hobby =&gt; { %&gt;
      &lt;div class=""&gt;&lt;%= hobby.name %&gt;&lt;/div&gt;
  &lt;% }); %&gt;
  </code></pre>
  
  <p>What is the best way to append to each div a class depending of hobby.category?</p>
  
  <p>I know its easily possible in React, but I don't want to use any framework for now.</p>