下列代码[br][/br] 1 2 3 4 5 6 7 var person={fname:"John",lname:"Doe",age:25}; var txt=""; for (x in person) { txt=txt + person[x]; } alert(txt); 输出为?
A: JohnDoe25
B: fname:"John",lname:"Doe",age:25
C: fname:John,lname:Doe,age:25
D: fnamelnameage
A: JohnDoe25
B: fname:"John",lname:"Doe",age:25
C: fname:John,lname:Doe,age:25
D: fnamelnameage
举一反三
- 以下代码片段执行后,text的值为:( )var person = {fname:"Bill", lname:"Gates", age:62};var text = "";for (var x in person) { text += person[x];} A: BillGates62 B: fname:"Bill", lname:"Gates", age:62 C: BillGates D: 62
- 以下代码片段执行后,text的值为:( )var person = {fname:"Bill", lname:"Gates", age:62};var text = "";for (var x in person) { text += person[x];} A: BillGates62 B: fname:"Bill", lname:"Gates", age:62 C: BillGates D: 62
- 下面的代码: var person = {fname:'Bill', lname:'Gates', age:62}; var text = ''; for (var x in person) { text += person[x]; } 循环结束后,text的值为:( )
- 下面的代码: var person = {fname:'Bill', lname:'Gates', age:62}; var text = ''; for (var x in person) { text += person[x]; } 循环结束后,text的值为:( )
- 下面的代码:var person = {fname:"Bill", lname:"Gates", age:62}; var text = "";for (var x in person) { text += person[x];}循环结束后,text的值为:( )。 A: Gates B: BillGates62 C: 62 D: Bill