diff --git a/public_html/js/client.js b/public_html/js/client.js index 7887471..741b554 100644 --- a/public_html/js/client.js +++ b/public_html/js/client.js @@ -1,5 +1,6 @@ // Constants and variables -var wsUri = "ws://localhost:8765"; +const wsUri = "ws://localhost:8765"; +let websocket; // Initialization @@ -21,7 +22,7 @@ function openWebSocket() { function onOpen(evt) { console.log('Connected to ' + wsUri + '.'); - text = "Meow"; + let text = "Meow"; console.log('Sending "' + text + '".'); websocket.send(text); }