From d380c7c63e00ca4e1cb9961f6306205da451fbc8 Mon Sep 17 00:00:00 2001 From: Rohit Paul <113459757+RohitPaul12345@users.noreply.github.com> Date: Wed, 9 Aug 2023 20:41:54 +0530 Subject: [PATCH] Update client.js --- live_chat_app/js/client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/live_chat_app/js/client.js b/live_chat_app/js/client.js index 655f5e6..d4a9233 100644 --- a/live_chat_app/js/client.js +++ b/live_chat_app/js/client.js @@ -6,7 +6,7 @@ const messageInput = document.getElementById('messageInp') const messageContainer = document.querySelector(".container") -var audio = new Audio('ring.mp3'); +let audio = new Audio('ring.mp3'); //function which will append event info to the container const append = (message , position)=>{ @@ -44,4 +44,4 @@ form.addEventListener('submit',(e)=>{ append(`You : ${message}`,'right'); socket.emit('send',message); messageInput.value = '' -}) \ No newline at end of file +})