Data Types
Numbers, strings, booleans, arrays, JSON objects
Numbers
The number data type hold a number value for example 1,2,3,3.5,etc. A number value is used to keep track of numarical values, so when using numbers use a number value
let StoredNumber = 0
console.log(StoredNumber)
Strings
String are used as text. When making a string value everything inside of the “ “ will become a string value. When putting numbers inside of the string they will not act like number values and instead will become a string value that says in text what the number is
let TestString = "Hello World"
console.log(TestString) // will print "Hello World" to the console
Bools
Bool values are used to store True or False values they are mainly used in conditions to check if something can happen or not. To make a bool vaue just write True or False after the var equal sign
let TestBool = true
console.log(TestBool) // will print "true" to the console
JSON OBJECTS
JSON Objects are mainly used in OOP as they can store multiple values like how an Array can store multiple values. To call a JSON Object you must put your values in {}
let Person = {
Name: "Bob",
Age: 25,
Gender: "Walmart Bag"
}
console.log(Person) // will print the object to the console