Skip to content

Commit 652ec79

Browse files
authored
Create variables
1 parent d085609 commit 652ec79

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

variables

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//[Variables]//
2+
var example = true;
3+
example = 'Israel'; // overwritten
4+
console.log(example); // console does this.
5+
6+
7+
const example = true;
8+
example = 'Israel'; // get error
9+
console.log(example); // SyntaxError
10+
// constants cannot be overwritten with values
11+
12+
//If we need to overwrite we use 'let'

0 commit comments

Comments
 (0)