Medium

How to Display Chat Messages Separately Using JavaScript Array Map Method

You’re implementing a simple chat application where users can send messages to each other. However, there's a problem with how messages are being displayed on the screen. The application shows all messages as one string instead of separate messages. Can you spot what's wrong with this code?

Choose an option below