Unit3.3-JS-DT

From WikiEducator
Jump to: navigation, search
Uou-logo-100px.png
Home  |  About UOU  |  About CEMCA  |  Contact Us    

Unit 3.3 Web application development tools & Technologies


3.3.5 JavaScript
  3.3.5.1 Data Types
  3.3.5.2 Variables
  3.3.5.3 Operators
  3.3.5.4 Conditional statement
  3.3.5.5 Dialog Boxes
  3.3.5.6 Functions


3.3.5.1 Data Types

The primitive data types that JavaScript supports are:

Data Type
Description
Example
Number
Consists of Integer and floating point numbers
123, -35.89
Boolean
Consists of logical value i.e. true or false
1 for true and 0 for false
String
A string is sequence of characters that are enclosed into double or single quotes
“Rajendra”, ‘Shastri Nagar, Lane 4’
Null
Consisting a single value null, which defines a empty or nonexistent reference

The Complex data type that JavaScript supports is:
Array: Array is cable of storing a sequence of values. Array values are stored in index and individual elements of an array are accessed by using these index.

Syntax:

arrayName= new Array(Array length)
arrayName= new Array( )

Examlple:
Books=new Array[3];
Books[0]=”HTML”;
Books[1]=”XML”;
Books[2]=”JAVASCRIPT”;

Array size can be extended further if more elements are to be inserted, by inserting element in the next index.
The values assigned to the array has no restriction, it could be of different types.
                                                                                                 Next

Suggested Reading
  • Web Applications


 Suggested Videos
  • Video 01 Title
  • Video 02 Title
  • Video 03 Title