当前位置:网站首页>^31 prototype interview questions
^31 prototype interview questions
2022-06-11 16:40:00 【sanda_ nd】
1、
function A() {
}
A.prototype.n = 1
var b = new A()
A.prototype = { //A The prototype of is given a new object
n: 2,
m: 3
}
var c = new A()
console.log(b.n, b.m, c.n, c.m) //1 undefined 2 3The relationship of each variable is shown in the figure :

2、
function F(){}
Object.prototype.a=function(){
console.log('a.()')
}
Function.prototype.b=function(){
console.log('b.()')
}
var f=new F()
f.a()
// f.b() Report errors
F.a()
F.b()Just search according to the figure
Red : Implicitly deliver
Blue : Deliver... Explicitly
边栏推荐
- web安全-靶场笔记
- 2022 simulated examination question bank and simulated examination for crane driver (limited to bridge crane)
- 什么是rs邮票纸?
- Wechat applet timestamp conversion time format + time subtraction
- 美团获得小样本学习榜单FewCLUE第一!Prompt Learning+自训练实战
- 基于udp端口猜测的内网穿透
- Weekly recommended short video: rookie CEO talks about the new logistics track in the future
- RSP: An Empirical Study of remote sensing pre training
- Analysis of time complexity and space complexity
- 学生网站模板棕色蛋糕甜品网站设计——棕色蛋糕甜品店(4页) 美食甜品网页制作期末大作业成品_生鲜水果网页设计期末作业
猜你喜欢

2022 high voltage electrician special operation certificate examination question bank and online simulation examination

^32执行上下文栈面试题

瑞吉外卖项目(三)员工管理业务开发

真香,华为主动离职也给 N+1

微服务连接云端Sentinel 控制台失败及连接成功后出现链路空白问题(已解决)
Persistence mechanism of redis

【clickhouse专栏】新建库、用户及角色

2022 molten welding and thermal cutting work license and simulation examination

RSP:遥感预训练的实证研究

Pyqt5 enables the qplaintextedit control to support line number display
随机推荐
CLP Jinxin helps Rizhao bank put into operation its new financial ecological network
pycharm和anaconda的基础上解决Jupyter连接不上Kernel(内核)的问题--解决方案1
2022安全员-C证特种作业证考试题库及答案
瑞吉外卖项目(三)员工管理业务开发
If you want to learn ArrayList well, it is enough to read this article
【剑指Offer】21.调整数组顺序使奇数位于偶数前面
2022年安全员-B证国家题库及模拟考试
从0到1了解Prometheus
回归预测 | MATLAB实现RBF径向基神经网络多输入单输出
How can the project manager repel the fear of being dominated by work reports?
[从零开始学习FPGA编程-18]:快速入门篇 - 操作步骤2-6- VerilogHDL时序电路语法分析(以计数器为例)
Report on the operation situation and future prospects of China's gear oil industry (2022-2028)
R1 Quick Open Pressure Vessel Operation test Library and Simulation Test in 2022
485天,我远程办公的 21 条心得分享|社区征文
[sword finger offer] 21 Adjust array order so that odd numbers precede even numbers
JINTE NET基金会将通过线上直播参与维度链全球战略发布会
A team of heavyweights came to the "digital transformation" arena of CLP Jinxin ice and snow sports
Go quick start of go language (I): the first go program
2022高压电工特种作业证考试题库及在线模拟考试
减肥期间可以吃肉吗?会胖吗?