GeezerVison is showing github.com — Add exercise for variables · ufo-github/javascript-2@2204b07
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: basics/types.md +21-1Lines changed: 21 additions & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -16,4 +16,24 @@ The most common ones are: |
16 | 16 |
|
17 | 17 | * **Objects**: a representation of a more complex object |
18 | 18 |
|
19 | | -JavaScript is a “loosely typed” language, which means that you don't have to explicitly declare what type of data the variables are. You just need to use the ```var``` keyword to indicate that you are declaring a variable, and the interpreter will work out what data type you are using from the context, and use of quotes. |
| 19 | +JavaScript is a *“loosely typed”* language, which means that you don't have to explicitly declare what type of data the variables are. You just need to use the ```var``` keyword to indicate that you are declaring a variable, and the interpreter will work out what data type you are using from the context, and use of quotes. |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | +--- |
| 24 | + |
| 25 | +Create a variable named `a` using the keyword `var`. |
| 26 | + |
| 27 | +```js |
| 28 | + |
| 29 | +``` |
| 30 | + |
| 31 | +```js |
| 32 | +var a; |
| 33 | +``` |
| 34 | + |
| 35 | +```js |
| 36 | +a; |
| 37 | +``` |
| 38 | + |
| 39 | +--- |