title: How do I append a button to a list item with JavaScript?
body: <p>This function is run every time an item is added to an array. It simply creates a list item element, appends some text to that item, and then appends it to a list element (#requestList).</p>
  <pre><code>function UpdateListOnScreen(NewListItem){
    
    var grabList = document.getElementById('requestList');
    
    var text = &quot;&quot;+ GetCalendarName(NewListItem.calChoice) +&quot; For &quot;+ GetLessonSlot(NewListItem.lessonChoice) + &quot; On &quot; + GetDateInTextForm(NewListItem.date) + &quot;&quot;;
    var entry = document.createElement('li');
    entry.id = list.length-1;
    entry.className = &quot;ItemNotChecked&quot;;
    entry.appendChild(document.createTextNode(text));
    grabList.appendChild(entry);
  }
  </code></pre>
  <p>Something I'm struggling to figure out is how do I add a button element onto that list item? I want every list item to have its own button element, but can't seem to figure out how I append a button to the list item after appending the text to the list item.</p>
  <p>Thanks.</p>