17
18// Define a route for the root URL
19app.get('/', (req, res) => {
20 res.sendFile(__dirname + '/public/index.html');21});
22
23io.on('connection', (socket) => {
In ES2015 (ES6), we can use template literals instead of string concatenation.
var str = `Hello, ${name}!`;
var str = "Hello, " + name + "!";
var str = "Time: " + (12 * 60 * 60 * 1000);
var str = "Hello World!";
var str = `Hello, ${name}!`;
var str = `Time: ${12 * 60 * 60 * 1000}`;
var str = "Hello, " + "World!";