百度暑期实习前端一面面经
1.meta标签有哪些内容,代表什么
2.px, em, rem
3.如何清除浮动
4.如何获取DOM元素的第一个子元素,3的倍数的元素
5.垂直水平居中
6.透明度从0->1,至少说出两种实现方式
7.css选择器优先级,权重计算
8.typeof和instanceof区别
9.同源策略,跨域方案
10.闭包
11.Vue生命周期
12.输出结果
2.px, em, rem
3.如何清除浮动
4.如何获取DOM元素的第一个子元素,3的倍数的元素
5.垂直水平居中
6.透明度从0->1,至少说出两种实现方式
7.css选择器优先级,权重计算
8.typeof和instanceof区别
9.同源策略,跨域方案
10.闭包
11.Vue生命周期
12.输出结果
String('11') == new String('11');
String('11') === new String('11'); String('11') 将变量转为字符串类型,new String('11')是创建一个新的string对象
13.输出结果
function Foo() {
Foo.a = function() {
console.log(1)
}
this.a = function() {
console.log(2)
}
}
Foo.prototype.a = function() {
console.log(3)
}
Foo.a = function() {
console.log(4)
}
Foo.a();
let obj = new Foo();
obj.a();
Foo.a(); 14.输出结果async function async1() {
console.log('async1 start');
await async2();
console.log('async1 end');
}
async function async2() {
console.log('async2');
}
console.log('script start');
setTimeout(function() {
console.log('setTimeout');
}, 0)
async1();
new Promise(function(resolve) {
console.log('promise1');
resolve();
}).then(function() {
console.log('promise2');
});
console.log('script end');
15.手写快排
16.项目相关
#前端实习##笔试题目##百度#

