JavaScript: Data Types

1// 5 is an integer data type
2console.log(5)
3
4// -5 is an integer data type
5console.log(-5)
1// 4.3 is a float data type
2console.log(4.3)
3
4// -4.3 is a float data type
5console.log(-4.3)
1// John is a string data type
2console.log("John")
1// true is a boolean data type
2console.log(true)
3
4// false is a boolean data type
5console.log(false)

These are the 4 main types of "primitive", "literal" values, which exist in basically every General-Purpose Programming Language (GPL)

It's important for the computer to be able to differentiate between these different types of values because they have to be handled differently from each other