variables and functions
This commit is contained in:
parent
20fbf34ec8
commit
c8446d5c93
6 changed files with 177 additions and 0 deletions
24
intro_js/variablerN4m1_2.html
Normal file
24
intro_js/variablerN4m1_2.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Let & var scopes</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
function testScopes() {
|
||||
var hello = "Var hello";
|
||||
let hello2 = "Let Hello";
|
||||
console.log(hello,hello2);
|
||||
{
|
||||
var yo = "Var yo i obj";
|
||||
let yo2 = "Let yo i obj";
|
||||
console.log(yo, yo2);
|
||||
}
|
||||
console.log(yo);
|
||||
}
|
||||
testScopes();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue