25暑期前端:阿里国际一面
1. 自我介绍
2. http问题,https怎么实现的(问的非常细节和深入)
3. egg.js问题,egg.js cluster
4. 线程和进程,java、js语言的比较
setTimeout(()=>{
console.log('1')
},0)
new Promise((res)=>{
console.log('2');
res();
}).then(()=>{
console.log('3')
})
console.log('4')
2
4
3
1
let a = 2;
function b (){let a = 1; return Function('console.log(this,a)')();}
b.call({})
window, 1
function b (){
let a = 1;
setTimeout(function(){
console.log(this,a);
},0)
}
b.call({})
function b (){
let a = 1;
console.log(this,a)
}
b.call({})
{}, 1
function b (){
let a = 1;
setTimeout(()=>{
console.log(this,a)
},0);
}
b.call({})
function extend(sub, parent) {
// clone
}
class sub {}
class parent {
constructor(){
this.name = 1;
}
}
parent.test = function(){}
extend(sub,parent);
// sub instanceof parent === true;
typeof sub;
'function'
var subinstance = new sub();
subinstance.name
2. http问题,https怎么实现的(问的非常细节和深入)
3. egg.js问题,egg.js cluster
4. 线程和进程,java、js语言的比较
setTimeout(()=>{
console.log('1')
},0)
new Promise((res)=>{
console.log('2');
res();
}).then(()=>{
console.log('3')
})
console.log('4')
2
4
3
1
let a = 2;
function b (){let a = 1; return Function('console.log(this,a)')();}
b.call({})
window, 1
function b (){
let a = 1;
setTimeout(function(){
console.log(this,a);
},0)
}
b.call({})
function b (){
let a = 1;
console.log(this,a)
}
b.call({})
{}, 1
function b (){
let a = 1;
setTimeout(()=>{
console.log(this,a)
},0);
}
b.call({})
function extend(sub, parent) {
// clone
}
class sub {}
class parent {
constructor(){
this.name = 1;
}
}
parent.test = function(){}
extend(sub,parent);
// sub instanceof parent === true;
typeof sub;
'function'
var subinstance = new sub();
subinstance.name
全部评论
太细了![](https://uploadfiles.nowcoder.com/images/20220815/318889480_1660553763930/8B36D115CE5468E380708713273FEF43)
相关推荐
![](https://static.nowcoder.com/fe/file/oss/1716965564844UEBJN.png)
![](https://static.nowcoder.com/fe/file/oss/1716965585666UBBME.png)
顺丰集团
| 实习
| 超多精选岗位
点赞 评论 收藏
分享
点赞 评论 收藏
分享