title: How to update cell in row in javascript?
body: <p>How can i update the the row of particular cell in the table when button of that row is clicked. I tried
  but it does not work.</p>
  <pre><code>&lt;table&gt;
   &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td id=&quot;news&quot;&gt;5&lt;/td&gt;
          &lt;td id=&quot;name&quot;&gt;James&lt;/td&gt;
          &lt;td&gt;&lt;button onclick=&quot;update_value(event)&quot;&gt;Update value&lt;/button&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td id=&quot;news&quot;&gt;6&lt;/td&gt;
          &lt;td id=&quot;name&quot;&gt;Nayome&lt;/td&gt;
          &lt;td&gt;&lt;button onclick=&quot;update_value(event)&quot;&gt;Update value&lt;/button&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td id=&quot;news&quot;&gt;9&lt;/td&gt;
          &lt;td id=&quot;name&quot;&gt;Adrlin&lt;/td&gt;
          &lt;td&gt;&lt;button onclick=&quot;update_value(event)&quot;&gt;Update value&lt;/button&gt;&lt;/td&gt;
      &lt;/tr&gt;
   &lt;/tbody&gt;
  &lt;/table&gt;
  
  function update_value(event) {
      let clickedElem = event.target;
      let newValue = 88;
      let newName = Radi;
      event.target.id.value = newValue;
      
  }
  
  </code></pre>