JavaScript Data Types

 
1. What is a String Data Type in JavaScript?

A string is a variable which stores a series of characters.

 
2. Give 3 examples of data considered as String.

EX:

var carname=”lala”;
var bakery=’macaron’;
var taste=’sweet’;

 
3. What is an Integer Data Type?

Variable which stores whole numbers

 
4. Give 3 examples of data considered as Integer.

16 & 20 & 31

 

 
5. What is a Floating-point value?

A real number (that is, a number that can contain a fractional part). The following are floating-point numbers

 

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

3.0

-111.5

½

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

True & False

 

 
8. What are the Composite Data Types?

Object & Array

 

 
9. What are the Special Data types in JavaScript?

Null & Undefined

 

Sources:

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

http://msdn.microsoft.com/en-us/library/ie/7wkd9z69%28v=vs.94%29.aspx

http://oreilly.com/javascript/excerpts/learning-javascript/javascript-datatypes-variables.html

http://www.webopedia.com/TERM/F/floating_point_number.html

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s