以下作品:
var Person = {};
Person.FirstName = '';
Person.LastName = '';
with (Person) {
FirstName = 'Phillip',
LastName = 'Senn';
}
log(Person);
但我想删除2-3行。
答案 0 :(得分:5)
怎么样:
var Person = {FirstName:'Philip', LastName:'Senn'};
log(Person);