portfolio/src/main/webapp/script.js
/**
 * Sends a POST request to servlet at '/delete-data' endpoint
 * to delete all existing comments, then calls fetchComments()
 * to refresh the display of comments.
 * 
 * @returns none
 */
Sends a POST request to servlet at '/delete-data' endpoint
to delete all existing comments, then calls fetchComments()
to refresh the display of comments.

@returns none
Sends a POST request to servlet at ' / delete - data ' endpoint to delete all existing comments then calls fetchComments () to refresh the display of comments . @returns none
function deleteAllComments() {
  const request = new Request('/delete-data', {'method': 'POST'});
  fetch(request).then(response => {
      fetchComments();  
    }
  );
}
function deleteAllComments ( ) { const request = new Request ( '/delete-data' , { 'method' : 'POST' } ) ; fetch ( request ) . then ( response => { fetchComments ( ) ; } ) ; }
Sends a POST request to servlet at '/delete-data' endpoint
 to delete all existing comments, then calls fetchComments()
 to refresh the display of comments.
Sends a POST request to servlet at ' / delete - data ' endpoint to delete all existing comments then calls fetchComments () to refresh the display of comments .