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>
This post was written by: Bharathi
Bharthi is a professional blogger, web designer and front end web developer. Follow him on Twitter
Subscribe to:
Post Comments (Atom)
0 Responses to “How to Create a direct instance of an object using javascript”
Post a Comment