Skip to content

Instantly share code, notes, and snippets.

@nolochemical
Created November 14, 2017 16:36
Show Gist options
  • Save nolochemical/b6ab208283ab3ca673204e03190c58b6 to your computer and use it in GitHub Desktop.
Save nolochemical/b6ab208283ab3ca673204e03190c58b6 to your computer and use it in GitHub Desktop.
Escape Variables ES6
/* Template literals
Ascii 96 || html `
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
.*/
hostname = "kruger"
port = 8080
console.log(`Server running at http://${hostname}:${port}/`);
//Server running at http://kruger:8080/
console.log(`Server running at
http://${hostname}:${port}/`);
// Server running at
// http://kruger:8080/
console.log("Server running at http://${hostname}:${port}/");
//Server running at http://${hostname}:${port}/
console.log('Server running at http://${hostname}:${port}/');
//Server running at http://${hostname}:${port}/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment