Browser and Web APIs

Chat Application: Dynamic Rendering

  1. Create a JavaScript chat with the following functions:
    • renderMessages takes an array of chat messages containing a username, text and timestamp, and renders them as an HTML list
    • fetchMessages creates an array of chat messages and calls the renderMessages function with it
    Call the fetchMessages function.
  2. Remove the static list of chat messages from the chat HTML page and embed the JavaScript instead.