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 calls the renderMessages function with itfetchMessages function.
chat HTML page and embed the JavaScript instead.