Javascript Object

tutorial and example
tutorial and example

An object is an entity having state and behavior. JavaScript is an object oriented scripting language. JavaScript is template based not class based but we can create object directly.

Syntax to add property to add object

We use the write() method to document objects to write any content on the document.

Example

The following example shows how to create an Object.

Try Now

Output

Methods of an Object

Example

Try Now

Output