Let's see -
The number type serves both for integer and floating point numbers. There are many operations for numbers, e.g. multiplication *, division /, addition +, subtraction - and so on. Besides regular numbers, there are so-called “special numeric values” which also belong to that type: Infinity, -Infinity and NaN (Not-a-Number).
"Infinity" represents the mathematical Infinity ∞. It is a special value that’s greater than any number.
"NaN" represents a computational error. It is a result of an incorrect or an undefined mathematical operation.
A string (or a text string) is a series of characters. Strings are written with quotes. You can use single or double quotes. You can use quotes inside a string, as long as they don't match the quotes surrounding the string.
Booleans can only have two values: true or false. Booleans are often used in conditional testing. If the value parameter is omitted or is 0, -0, null, false, NaN, undefined, or the empty string (" "), the object has an initial value of false.
An empty value has nothing to do with undefined. An empty string has both a legal value and a type.
The typeof operator
As an operator: typeof x.
Function style: typeof(x).
In other words, it works both with parentheses or without them. The result is the same.
Photograph by Eny Setiyowati