Home > DeveloperSection > Interviews > how to create object and assign the value in object?

Posted on    March-18-2011 12:00 AM

 JavaScript JavaScript 
Ratings:
 1 Answer(s)
  1152  View(s)
Rate this:

Amit Singh

Total Post:565

Points:2825
Posted on    March-18-2011 12:00 AM

Create new object
var obj =new Object();
or
obj={};

Assign the value in object
obj["name"]="amit";
or
obj.name="amit";

Don't want to miss updates? Please click the below button!

Follow MindStick