JSFiddle - React, Tailwind, and code Playground

HTML

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

JavaScript

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

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