Monday 16 July 2012

How to Create a direct instance of an object using javascript


<!DOCTYPE html>
<html>
<body>

<script type="text/javascript">
personObj={firstname:"John",lastname:"Doe",age:50,eyecolor:"blue"}

document.write(personObj.firstname + " is " + personObj.age + " years old.");
</script>

</body>
</html>

0 Responses to “How to Create a direct instance of an object using javascript”

Post a Comment