Why can’t my js dynamically clear the td entry of table?

  node.js, question

I can use ELEM. parentnode. removechild (ELEM) to remove it, but I can’t use the project inside myself.

The code is as follows:

var swipe_td_arr = document.getElementById('swiper-body').getElementsByTagName('td');
 
 var swipe_len = swipe_td_arr.length;
 
 console.log(swipe_td_arr)
 
 for(var w = 0 ;   w  < swipe_len;  W plus)
 if(swipe_td_arr[w].innerHTML === 'undefined'){
 console.log('enter undefined')
 swipe_td_arr[w].parentNode.removeChild(swipe_td_arr[w])
 bracket
 bracket

Talk is cheap, show me the code.