WebSocket

Step 2: Everything sent back from the server is a string. To convert the response to an array of messages, replace the line containing this.response with:
let messages = JSON.parse(this.response)
View the messages in the browser console again, and notice that they show up as an array now. Show the messages on the page.
Last step Next step