如何动态设置theName
并进行更改?有没有办法做到这一点?
var myTeam = new Object ();
function AddObject(theName) {
var person = new Object();
person.firstName = "John";
person.lastName = "Doe";
person.age = 50;
person.eyeColor = "blue";
myTeam.theName = person;
}
AddObject("Example1");
AddObject("Example2");
AddObject("Example3");