var person={fname:"John",lname:"Doe",age:25};
person.fname; //it gives a output John
for (x in person)
{
alert(person[x]); //works fine
person.x; //incorrect why???
}
誰かがこの背後にある正確なロジックを説明できますか?
var person={fname:"John",lname:"Doe",age:25};
person.fname; //it gives a output John
for (x in person)
{
alert(person[x]); //works fine
person.x; //incorrect why???
}
誰かがこの背後にある正確なロジックを説明できますか?