JScript supports a total of 5 main data types. These include numbers (= float and integers), texts (= strings), logical values (= Boolean), functions and objects.
The logical values (= Boolean values) can have two states; these are"true" and"false". Using logical values you can create a script that reacts to conditions.
Numbers are divided into two groups. On the one hand integers like 1, 123, 150 and on the other hand in decimal numbers. These are numbers like 12.1236 or 3.1415926 etc.
There are various reasons for differentiating between integers and decimal points. In this way, you can immediately determine the successor or predecessor for whole numbers. A number 12 is replaced by 13, which is not possible with decimal numbers. A number 12.2568 has no successor, it can be 13, but also 12.26 etc. The computer can calculate faster and more accurately with integers than with decimal numbers. Decimal numbers can cover a larger range of numbers and, of course, very small numbers through the comma.
For integers there is the alternative hexadecimal notation. Here, the number begins with"0x" for an example:
In the above example, the hexadecimal value"0xFF" corresponds to the decimal value 255, but floating point values also have an alternative representation. It is the exponential notation.
These decimal numbers all correspond to the same value. So you can omit the leading zeros before the comma in JScript.
A text is displayed in double quotation marks (=apostrophes).
"This is a text"
"The above number is also a text"