mirror of
https://github.com/JeremyLikness/vanillajs-deck
synced 2025-12-16 11:14:18 +00:00
moar slides, disable localhost pwa cache
This commit is contained in:
19
slides/110-variables.html
Normal file
19
slides/110-variables.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<title>JavaScript Scope and Variables</title>
|
||||
<h1>JavaScript Scope and Variables</h1>
|
||||
<pre>var x = 1;</pre>
|
||||
<pre class="appear">
|
||||
// local scope
|
||||
for (let x = 1; x < 100; x+=1) {...}
|
||||
var y = 1;
|
||||
function process(inp) {
|
||||
let y = inp * 2;
|
||||
return y;
|
||||
}
|
||||
process(y);
|
||||
</pre>
|
||||
<pre class="appear">
|
||||
// constants
|
||||
const x = 1;
|
||||
x = 2; // 💣 BOOM!
|
||||
</pre>
|
||||
<next-slide>120-gosinta</next-slide>
|
||||
Reference in New Issue
Block a user