[ LiB ] |
JavaScript and JScript support script execution by providing access to resources by way of objects. Both languages share the same built-in object model, which consists of a small collection of objects. Access to additional objects is provided to scripts by the browser or the WSH, depending on which environment the scripts execute in.
NOTE
Not every object has both properties and methods , although most do. For a detailed list of objects, see Appendix A.
Custom objects are created using the new keyword. For example, you can create a new instance of an Array object as demonstrated below.
Animals = new Array("mice", "dog", "cat", "hamster", "fish");
As you can see, the new keyword is used to create an instance (Animals) of the Array object.
[ LiB ] |