Wednesday, February 9, 2011

Data Types

JavaScript uses three basic data types.
1. text
2. number
3. boolean

Text
Text is usually words or sentences, but it doesn't have to be.
Also known as strings, JavaScript text always appears within quotes(" ") or apostrophes(' ').

Number
Numbers are used to store numeric data like the weights and quantities of things. JavaScript numbers can be either integer/whole numbers or decimals.

Boolean
Boolean data is always in one of two possible states--true or false.
You can use this to represent anything that has two possible settings.

No comments:

Post a Comment