Q:

Setting an icon to an element that will be inserted on an event

Got this page, https://jsfiddle.net/twpn01Lz/. It's a book library.
I'm trying to find a method to add a tick icon or X icon whenever someone selects a radio button.
At the moment, I can get the value of the radio button and work with it in JS but I don't know how to instead use the the icon for the value. I was looking for a method to replace it in JS but couldn't find one and also I was looking for a method to change it directly in HTML but no luck.
function addBookToList(book) {
 const list = document.querySelector('#book-list');
 const row = document.createElement('tr');

 row.innerHTML = `
      <td>${book.name}</td>
      <td>${book.author}</td>
      <td>${book.pages}</td>
      <td>${book.read}</td>
      <td>
        <a href = '#' class='delete'> 
          <i class="fas fa-trash-alt delete">
          </I>
        </a>
      </td>
    `
 list.appendChild(row);
}

A:

Do you mean 
https://jsfiddle.net/mplungjan/yx4k6thw/
let read = document.querySelector('#radio1').checked ? "✔":"";

or perhaps 
let readIt = document.querySelector('#radio1').checked;
let read = `<i class="fas fa-${readIt?"check":"times"}"></i>`;

