1var age = 18; // number
2var name = "Jane"; // string
3var name = {first:"Jane", last:"Doe"}; // object
4var truth = false; // boolean
5var sheets = ["HTML","CSS","JS"]; // array
6var a; typeof a; // undefined
7var a = null; // value null
8
1dataTypes = {
2 Numbers = 1,2,3, 100, 3.14
3 Strings = 'Hello, World' "helloworld@gmail.com
4 Boolean = true / false
5 Null = 'Explicitly set a variable with no Value'
6 Undefined = 'For variable that have not yet been defined'
7 Object = 'Complex data structures - Arrays, Dates, Literals etc'
8 Symbol = 'Used with objects' // usually not needed
9}
1
2let length = 16; // Number
3
4let lastName = "Johnson"; // String
5
6let x = {firstName:"John", lastName:"Doe"}; // Object
7
1let length = 16; // Number
2let lastName = "Johnson"; // String
3let x = {firstName:"John", lastName:"Doe"}; // Object