这是在博客园看到的几道题一直着摸不透,我重新编辑了过来。请各位大大解下思路!原地址:http://www.cnblogs.com/rexy/p/4086186.html第一题varfun=function(){this.name='peter';return{name:'jack'};}varp=newfun();//请问p.name是:第二题varfun=function(){this.name='peter';return'jack';}varp=newfun();//请问p.name是:第三题varfun=function(){}fun.prototype={info:{name:'peter',age:25}}vara=newfun();varb=newfun();a.info.name='jack';b.info.name='tom';//请问a.info.name和b.info.name分别是:第四题varfun=function(){this.info={name:'peter',age:25}}vara=newfun();varb=newfun();a.info.name='jack';b.info.name='tom';//请问a.info.name和b.info.name分别是:第五题varfun=function(){}fun.prototype={name:'peter',age:25}vara=newfun();varb=newfun();a.name='jack';b.name='tom';//请问a.name和b.name分别是:第六题varfun=function(){this.info={name:'peter',age:25}}fun.prototype={info:{name:'peter',age:25}}vara=newfun();varb=newfun();a.info.name='jack';b.info.name='tom';//请问a.info.name和b.info.name分别是:
相关分类