Acusis/chat.js
2021-01-11 00:50:11 +02:00

10 lines
234 B
JavaScript

chatArr=[]
function chat(message, peer){
chatArr.push(peer+": "+message)
chathtml = ""
chatArr.forEach(element => {
chathtml=chathtml+element+"</br>"
})
document.getElementById("chat").innerHTML = chathtml
}