chat with the following functions:
renderMessages takes an array of chat messages containing a username, text and timestamp, and renders them as an HTML listfetchMessages creates an array of chat messages and uses it to call the renderMessages functionfetchMessages function at the beginning of the script.
chat HTML page and embed the JavaScript instead.