IT Community - Software Programming, Web Development and Technical Support

Objects in Javascript

This is a discussion on Objects in Javascript within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; Hi, In javascript we can have Object also. We can do lot with this Objects Here we can create our ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > HTML, CSS and Javascript Coding Techniques

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 06-02-2008, 03:11 AM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,159
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Objects in Javascript

Hi,
In javascript we can have Object also. We can do lot with this Objects

Here we can create our own object
__________________
With,
J. Jeyaseelan

Everything Possible
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-02-2008, 03:12 AM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,159
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: Objects in Javascript

Object Creation

Generally objects may be created using the following syntax:

name = new Object();

We can access its attribute and its values.
__________________
With,
J. Jeyaseelan

Everything Possible
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-02-2008, 03:13 AM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,159
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: Objects in Javascript

For instance Array, Date, Number, Boolean, and String objects can be created this way as in the example below. Most objects may be created this way except for the Math object which cannot be instantiated (an instance of it may not be created).

ratings = new Array(6,9,8,4,5,7,8,10)
var home = new String("Residence")
var futdate = new Date()
var num1 = new Number()

String objects may also be created as follows:

var string = "This is a test."
__________________
With,
J. Jeyaseelan

Everything Possible
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Proxy objects vijayanand C and C++ Programming 0 09-22-2007 02:19 AM
Proxy objects vijayanand C and C++ Programming 0 09-21-2007 02:39 AM
virtual objects simplesabita Testing Tools 2 08-28-2007 05:40 AM
How many objects are there? vadivelanvaidyanathan Java Programming 3 07-16-2007 09:49 PM
the new Net Objects 10 aquariancore Web Design Help 1 04-20-2007 07:46 PM


All times are GMT -7. The time now is 04:32 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0