-
Notifications
You must be signed in to change notification settings - Fork 7
/
03-variables.html
36 lines (30 loc) · 982 Bytes
/
03-variables.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Demo</title>
</head>
<body>
<script type="text/javascript">
// Let's learn variables
/*
A variable is a simple reference to a larger value.
Simply put, a variable is a placeholder.
Syntax for a variable
var - defines statement
= - assignment operator
value - what is assigned to the variable
var x = 100;
*/
var myNumber = 100;
document .write(myNumber);
/*
Variables are case sensitive
All vars need to start with an underscore or a letter,
vars CANNOT start with numbers.
Only use letters, numbers and underscores.
*/
</script>
</body>
</html>