Custom Object
What is Custom Object?.

Object that is create by programmer is called Custom Object.

Code to create custom object

person=new  Object();

where person is the name of object.

To set properties of the object

person.firstname=\"Arun\";
person.lastname=\"sharma\";

1- Example to create Object and set properties.

<html>
<head>
<title>Javascript Example</title>
</head>
<body>
<script language=\"javascript\" type=\"text/javascript\">
person=new Object();
person.firstname=\"Arun\";
person.lastname=\"sharma\";
document.write(person.firstname+\" \"+person.lastname);
</script>
</body>
</html>


Previous