Home arrow JavaScript arrow Properties and Methods of Custom 2D JavaScript Arrays
JAVASCRIPT

Properties and Methods of Custom 2D JavaScript Arrays


This is part two of a series that discusses custom 2D JavaScript arrays. In this part of the series, we see how to develop the properties and methods of our custom 2D array.

Author Info:
By: Chrysanthus Forcha
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
October 14, 2009
TABLE OF CONTENTS:
  1. · Properties and Methods of Custom 2D JavaScript Arrays
  2. · The Constructor Function
  3. · The Array Object Type Methods
  4. · Adding Cells

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Properties and Methods of Custom 2D JavaScript Arrays
(Page 1 of 4 )

An Example

For simplicity, let us have an array that is regular at the beginning; that is, an array whose number of rows and columns can be determined at the beginning by passing two arguments to the constructor function. The array will have the properties and methods described in the previous part. For easy reference, I repeat the properties and methods here.

Properties

height: Number of rows in the array.

Methods

insertRow: to insert a row in the array.

deleteRow: to delete a row.

I will show you how to add other methods.

For simplicity, when a row is inserted, it will be blank; that is, it will have no cells. I will show you how to give contents to the cells of the rows. The 2D array may end up with rows of different lengths.


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 4 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials