client.js small modernization

This commit is contained in:
Jamie Kerner 2018-11-11 16:23:44 +01:00
parent 4211560f20
commit e54a4f0b13
1 changed files with 3 additions and 2 deletions

View File

@ -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);
}