haizlin / fe-interview

前端面试每日 3+1,以面试题来驱动学习,提倡每日学习与思考,每天进步一点!每天早上5点纯手工发布面试题(死磕自己,愉悦大家),6000+道前端面试题全面覆盖,HTML/CSS/JavaScript/Vue/React/Nodejs/TypeScript/ECMAScritpt/Webpack/Jquery/小程序/软技能……
http://www.h-camel.com
MIT License
25.54k stars 3.26k forks source link

原型相关[js] #2648

Closed CHWYH closed 4 years ago

CHWYH commented 4 years ago

var A = function() {}; var b = new A(); A.prototype = { n: 0, m: 1 } 与以下方式的声明有什么区别,为什么? var A = function() {}; var b = new A(); A.prototype.n = 0; A.prototype.m = 1;

haizhilin2013 commented 4 years ago

是要出题吗?出题可以在这里提交哦:http://www.h-camel.com/contribution.html

CHWYH commented 4 years ago

好的,还以为是直接提交 issue 

------------------ 原始邮件 ------------------ 发件人: "haizlin/fe-interview" <notifications@github.com>; 发送时间: 2020年7月15日(星期三) 中午1:04 收件人: "haizlin/fe-interview"<fe-interview@noreply.github.com>; 抄送: "WYH"<857292988@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [haizlin/fe-interview] 原型相关[js] (#2648)

是要出题吗?出题可以在这里提交哦:http://www.h-camel.com/contribution.html

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

haizhilin2013 commented 4 years ago

感谢贡献!那我先关闭这个issues了