大型国企互联网公司
深圳字节广告业务组前端社招一面:凉面
1、自我介绍
2、进程与线程关系
3、进程与线程内存关系
4、cpu是如何开启进程、如何开始执行指令集?
5、网络:状态码、304缓存。
6、https,如何加密,对称加密和非对称加密。
7、事件循环 event loop
// define
async function async1() {
console.log('async1 start');
await async2();
console.log('async1 end');
}
async function async2() {
console.log('async2');
}
// execute
console.log('script start');
setTimeout(() => {
console.log('setTimeout');
}, 0);
async1();
console.log('script end');
// 请分析输出顺序: 8、原型链
const obj0 = { x: 0, y: 0 };
const obj1 = Object.create(obj0);
const obj2 = Object.create(obj1);
obj1.x = 1;
obj0.x; // ?
obj2.x; // ?
obj2.y; // ?
obj2.z; // ? // define
function Foo() {
getName = () => {
console.log(1);
};
return this;
}
Foo.getName = () => {
console.log(2);
};
Foo.prototype.getName = () => {
console.log(3);
};
var getName = () => {
console.log(4);
};
function getName() {
console.log(5);
}
// execute
getName(); // 4
Foo.getName(); // 2
Foo().getName(); // 1
new Foo().getName(); // 3 最后,安慰了一下,结束面试。。。。
查看5道真题和解析
