In javascript we can create objects in different ways.
var userObject = {};
userObject['userName'] = 'abc'; (or) userObject.userName = 'abc';
(or)
var userObject = new Object();
userObject['userName'] = 'abc'; (or) userObject.userName = 'abc';
(or)
var userObject = Object.create(null);
userObject['userName'] = 'abc'; (or) userObject.userName = 'abc';
Let me know, if you have any feedback. Mail me for source code. Enjoy reading my articles…
sekhartechblog@gmail.com
No comments:
Post a Comment