Javascript 如何创建默认对象?
我想做相当于Javascript 如何创建默认对象?,javascript,function,extjs,shorthand,Javascript,Function,Extjs,Shorthand,我想做相当于 //Nonsensical config.items=[Ext.create('Foo.register.AccountTypeForm',{config:arguments.hidden=true})]; //works ofc, but it looks untidy arguments.hidden=true; config.items=[Ext.create('Foo.register.AccountTypeForm',{config:arguments})]; 你能这
//Nonsensical
config.items=[Ext.create('Foo.register.AccountTypeForm',{config:arguments.hidden=true})];
//works ofc, but it looks untidy
arguments.hidden=true;
config.items=[Ext.create('Foo.register.AccountTypeForm',{config:arguments})];
你能这样做吗
config.items=[Ext.create('Foo.register.AccountTypeForm',
{config:{hidden:true}})];
或者您需要稍后再次引用arguments对象吗?只需在默认参数周围切换,这正是我需要的,谢谢。