JSFiddle - React, Tailwind, and code Playground

HTML

<tr>
  <td>1</td>
  <td>2</td>
  <td>3</td>
  <td>4</td>
  <td>5</td>
</tr>

JavaScript

const parent = document.getElementsByTagName('tr');
const toRemove = [ 2,3 ];

toRemove
  .map(n => parent.children[n])
  .filter(Boolean)
  .forEach(n => n.remove());