1//Making variables with let:
2let numberOfFriends = 1;
3
4//Incrementing:
5numberOfFriends += 3; //numberOfFriends is now 4
6
7// Variables with const
8const minimumAge = 21; //CANNOT REASSIGN!
9
10//Booleans - true or false values
11true;
12false;
13let isHappy = true;
14
15//Naming Conventions
16// Use upper camel-cased names:
17let numberOfChickens = 6; //GOOD
18// NOT THE JS WAY:
19// let number_of_chickens = 6;
1var myString = "string"; //var can be redefined
2var myInt = 34; //var can be redefined
3const myString2 = "string"; //const cannot be redefined
4const myInt2 = 69; //const cannot be redefined
1// Also let, const
2var e_number = 0;
3var e_string = '';
4var e_true = true;
5var e_false = false;
6var e_undefined = undefined;
1var myVar; //unitialized variable( can be intiallized later )
2var number = 1; //number
3var string = " hello world " ; //string
4var boolean = true ; //boolean
5myVar = function(){ //variable can hold function
6
7};