// This example is from the book _JavaScript: The Definitive Guide_. // Written by David Flanagan. Copyright (c) 1996 O'Reilly & Associates. // This example is provided WITHOUT WARRANTY either expressed or implied. // You may study, use, modify, and distribute it for any purpose. function InitializedArray(len) { this.size = len; // In 2.0, this sets array element 0. for (var i = 1; i < InitializedArray.arguments.length; i++) this[i] = InitializedArray.arguments[i]; }