title: How to skip the set of values to the first td of a table created dinamically from javascript?
body: <p>I'm trying to create a table with the days of the months that puts values only in one row (day)</p>
  <p>I want the first <code>td</code> of each <code>tr</code>to be empty, however I've been unable to achieve. This is my &quot;working&quot; snippet.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>"use strict";
  const dias = new Date().getDate();
  const dayX = {
      numero: 2,
      values: { par1: 1, par2: 2, par3: 3, par4: 4, par5: 5, par6: 6, par7: 7, par8: 8, par9: 9, par10: 10 }
  };
  let objvalforin = dayX.values;
  let arr = [];
  for (const key in objvalforin) {
      if (Object.prototype.hasOwnProperty.call(objvalforin, key)) {
          const element = objvalforin[key];
          arr.push(element);
      }
  }
  for (let index = 0; index &lt; dias; index++) {
      var tr = document.createElement("tr");
      for (let j = 0; j &lt; 10; j++) {
          var td = document.createElement("td");
          td.innerText = "";
          td.id = index;
          if (td.innerText == "") {
              td.classList.add("tdVacia");
          }
          if (parseInt(td.id) === dayX.numero) {
              td.innerHTML = arr[j];
          }
          tr.appendChild(td);
      }
      document.getElementById("allDays").appendChild(tr);
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>td, th {
      width: 100px;
      border: 1px solid #ccc;
      padding: 2px;
      text-align: center;
  }
  
  .tdVacia {
      height: 25px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;title&gt;Typescript&lt;/title&gt;
      &lt;link rel="stylesheet" href="estilos.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;p id="contenedor"&gt;&lt;/p&gt;
  
      &lt;table&gt;
          &lt;thead&gt;
              &lt;td&gt;date&lt;/td&gt;
              &lt;th&gt;param 1&lt;/th&gt;
              &lt;th&gt;param 2&lt;/th&gt;
              &lt;th&gt;param 3&lt;/th&gt;
              &lt;th&gt;param 4&lt;/th&gt;
              &lt;th&gt;param 5&lt;/th&gt;
              &lt;th&gt;param 6&lt;/th&gt;
              &lt;th&gt;param 7&lt;/th&gt;
              &lt;th&gt;param 8&lt;/th&gt;
              &lt;th&gt;param 9&lt;/th&gt;
              &lt;th&gt;param 10&lt;/th&gt;
          &lt;/thead&gt;
          &lt;tbody id="allDays"&gt;
  
          &lt;/tbody&gt;
      &lt;/table&gt;
  
  
      &lt;script src="app.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Thanks.</p>