Introducing object part 3

Object Methods



An object method is a property that contains a function definition.

Use the following syntax to access an objectmethod.objectName.methodName()
As you already know, document.write()outputs data. The write() function is actually a method of the document object.
document.write("This is some text");Try It Yourself

Methods are functions that are stored as object properties.

Comments

Popular posts from this blog

String Operators

Associative Arrays part 2