File Management

TEMPLATE LITERAL (f-string)

Template Literals are the JavaScript equivalent of f-strings in Python.

tLiteral.js

			
let bestCity = 'Miami';

/*Template literals are like Python f-strings, but f' is replaced by ``, and {} is replaced by ${}*/
let popup = `The best city on the planet is ${bestCity} dale!`;

console.log(popup); // outputs to console.
alert(popup); // outputs via popup tot user.
		

<head>
	<script src="tLiteral.js" defer></script>
<head>

<button id="t_string">tLiteral.js</button>