Site hosted by Angelfire.com: Build your free website today!
JavaScript
Another Vrong © JavaScript Tutorial

JavaScript’s Object Model

In JavaScript an object is a construct with properties that are variables or other objects. Functions associated with an object are known as the object’s methods. JavaScript includes some built-in objects and functions, but we can define our own as well.

Built-in Objects
JavaScript comes with a number of predefined objects. Like Java’s built-in classes, these objects make it easy to build some basic functions into a JavaScript program without having to do all the work yourself.

The first built-in object is the string object. Whenever you assign a string value to a variable or property, you’ve created a string object. An example is

samplestring = "Hello World"

The advantage of making a string into an object is that the object can have methods attached to it, as shown here:

document.write(samplestring.toUpperCase())
will return "HELLO WORLD"

Under Construction ... more to come ...


[JavaScript History] [What is JavaScript] [Using JavaScript] [JavaScript Language] [JavaScript Statements]
[JavaScript Object Model] [JavaScript Event Handler] [JavaScript Example] [JavaScript Home]
Comments & Suggestions or Send Feedback
Internet Addiction, Funny Stuff & Cricket .