var optionsCache = {};// Convert String-formatted options into Object-formatted ones and store in cachefunction createOptions( options ) {var object = optionsCache[ options ] = {};jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {object[ flag ] = true;});return object;}createOptions('once momery');這個(gè)函數(shù)執(zhí)行后,為什么optionsCache[ options ]={once:true,momery:true},我想知道的是他為什么和object的值一樣,可是我在each外單獨(dú)改變object的值,optionsCache[ options ]卻不跟著改變??
添加回答
舉報(bào)
0/150
提交
取消