With the Array object methods push(), pop(), unshift() and shift(), you can build various stacks and queues.
'First In First Out' queues can be built with either unshift() and pop() or push() and shift() depending on which direction you want the objects to be queued in.
These capabilities have been available in Netscape since version 4, but are only available in MSIE at version 5.5, having been added to gain ECMA edition 3 compliance.
Prev | Home | Next |
Q object | Up | Quotation mark (" and ') |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |