console?), the rest of them are so called primitives.
This data type represents any kind of number, including numbers with decimals like
String is a group of characters (letters, numbers, symbols) available on the keyboard. The important thing is that strings are always surrounded by quotes, preferably single quotes
'....'. String is just a fancy word for a regular text.
This data type represents logical state and has only two possible mutually exclusive values. It’s either
false (notice it’s without quotes, so it’s not a string). You can think of Boolean as a switch that can be on or off.
Null means an intentional absence of a value. It’s represented by the keyword
null (again, without quotes as it’s not a string).
Another data type that represents the absence of a value, but it has a different use than null. Undefined is represented by the keyword
undefined (again, no quotes).
Object represents a collection of related data and actions performed on such data. Unlike all the data type above, object is not a primitive, it’s a complex data type.
Before we move on, let’s practice the difference between strings and numbers. First, we will print a string surrounded by quotes. As you can see below, it’s a whole sentence composed of different words, spaces, and punctuation.
console.log('My name is Jan. My website is available at https://codewithjan.com.');
Next, we will print the number 40. Notice that in this case, we won’t use quotes.