How do I add different classes to <td> in javascript : Hey I have two td elements in a table. I want the have separate style classes for them. How do I do this?

This is my code: 

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-js -->

    table += "<tr>";
      for(var i = 0; i < data.list.length; i++){
        table += "<td>" + "<table>" + "<td>" + value1 "</td>" + "<td>" + value2 + "</td>" + "</table>";
      }
    table += "</tr>";

<!-- end snippet -->

I have tried to simply add class in td element but that does not work. Any ideas? I use Javascript to create the table. 

So this does not work:

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-js -->

    table += "<tr>";
      for(var i = 0; i < data.list.length; i++){
        table += "<td>" + "<table>" + "<td class="one">" + value1 "</td>" + "<td class="two">" + value2 + "</td>" + "</table>";
      }
    table += "</tr>";

<!-- end snippet -->

