# JavaScript Data Types

1. What is a String Data Type in JavaScript?

String is a type of variable that is capable of storing data, which is series of characters. It can be used in quotes, or even double quotes.

2. Give 3 examples of data considered as String.

Series of characters such as “John Doe”, Inside quotes, or double quotes.

3. What is an Integer Data Type?

Integer is another type of variable in JavaScript, that is capable of storing numbers. Integer values can be positive whole numbers, negative whole numbers, and 0. They can be represented in base 10 (decimal), base 16 (hexadecimal), and base 8 (octal). Most numbers in JavaScript are written in decimal.

4. Give 3 examples of data considered as Integer.

It is decimal, hexadecimal, and octal.

5. What is a Floating-point value?

Floating-point value can be described in scientific notation, it can also be a whole number with a decimal portion. In scientific notation, an uppercase or lowercase “e” is used to represent “ten to the power of”. JavaScript shows numbers using the eight byte program: IEEE 754 floating-point standard for numerical representation. This means you can write numbers as large as 1.79769×10^(308)^, and as small as 5×10^(-324)^. A number that contains a decimal point and that has a single “0” before the decimal point is interpreted as a decimal floating-point number.

6. Give 3 examples of data considered as Floating-point numbers.

It could be whole number with a decimal portion, a scientific notation, or even a mix between those two such as: 3.45e2 meaning 3.45 multiplied by ten to the power of 2, ending up with a 345.

7. What are the two values considered as Boolean Data Type?

They are the literals true and false.

8. What are the Composite Data Types?

It is object and array.

9. What are the Special Data types in JavaScript?

It is null and undefined.

Web Sources:

http://www.w3schools.com/js/js_datatypes.asp

http://msdn.microsoft.com/en-us/library/ie/7wkd9z69(v=vs.94).aspx

http://en.wikibooks.org/wiki/JavaScript/Variables_and_Types

Posted on March 13, 2013, in ICT G9. Bookmark the permalink. Leave a comment.

## Leave a comment

## Comments 0