async function deleteComment(i) {
  const id = js[i].key.id;

  // do this so visual feedback is instantaneous
  document.getElementsByClassName("comment")[i - (pg-1)*numElemsPerPage].style.display = "none";

  await fetch("/delete-data?id=" + id);
  getAndRefreshComments();
}
/* Deletes an individual comment from the database and refreshes the page. */
Deletes an individual comment from the database and refreshes the page.
Deletes an individual comment from the database and refreshes the page .
async function deleteComment(i) {
  const id = js[i].key.id;
  document.getElementsByClassName("comment")[i - (pg-1)*numElemsPerPage].style.display = "none";
  await fetch("/delete-data?id=" + id);
  getAndRefreshComments();
}
async function deleteComment ( i ) { const id = js [ i ] . key . id ; document . getElementsByClassName ( "comment" ) [ i - ( pg - 1 ) * numElemsPerPage ] . style . display = "none" ; await fetch ( "/delete-data?id=" + id ) ; getAndRefreshComments ( ) ; }
Deletes an individual comment from the database and refreshes the page.
Deletes an individual comment from the database and refreshes the page .
// do this so visual feedback is instantaneous