百度暑期实习(一面凉)

面试时常应该是一个小时,4.12号笔试4.17号面试

1.自我介绍

2.项目介绍

3.3D地图展示到页面是怎么实现的?这一块有什么成熟的技术吗?

4.js的基础数据类型有哪些

5.大一到现在学习过哪些语言?

6.python的作用域和js的作用域有什么区别

for(var i = 0;i<=10;i++){
    setTimeOut(()=>{
        console.log(i)
    })
}

上述代码怎么改才能输出从1到10,不改let还有什么别的方法?

setTimeout(()=>{
    console.log('谁写js啊')
})
console.log('真香')

上述代码的输出顺序?怎么先输出“真香”后输出'谁写js啊'?(我开始用的async/await)后面再用Promise实现(他说本意是考察Promise)

//类似于这个,写执行顺序
async function async1() {
    console.log('async1 start');
    await async2();
    console.log('asnyc1 end');
}
async function async2() {
    console.log('async2');
}
console.log('script start');
setTimeout(() => {
    console.log('setTimeOut');
}, 0);
async1();
new Promise(function (reslove) {
    console.log('promise1');
    reslove();
}).then(function () {
    console.log('promise2');
})
console.log('script end');

10.说一下事件冒泡和事件劫持?知道事件委托吗?

11.ES5的继承方式有哪些?给你两个类,写一下继承

//开始这么写的
        function Animal(){
            this.name=name;
            this.legNum=legNum;
        }

        Animal.prototype.run=function () {
            console.log("");
        }

             function Dog(){
                    this.color=color;
                }
            Dog.prototype.bark=function () {
            console.log("");
        }

        Dog.prototype=new Animal();
        
//后面他写了一个,让我补充完整
class Animal{
    constructor(){
        this.name=name;
    this.color=color;
    this.legNum=legNum;
    }
    run(){
        console.log("");
    }
}
class Dog extends Animal{
    constructor(){
        super()
        this.name=name;
    this.color=color;
    this.legNum=legNum;
    }
    bark(){
        console.log("");
    }
}
给我的建议:百度对实习生的要求是熟悉js的基础,对ES5和ES6之间区别和转换,作用域这些,项目只是加分项,希望我之后梳理一下js部分的知识。
百度的面试体验还是很好的,给我的建议也很中肯,虽然凉的太快有点打击到我,但是也很感谢这一盆凉水让我沉下心来去看书,去真正理解概念。
#面试复盘##实习##面经##前端#
全部评论

相关推荐

废物一个0offer:认真的吗二本本科找人工智能岗位
点赞 评论 收藏
分享
06-18 13:28
已编辑
门头沟学院 Web前端
爱睡觉的冰箱哥:《给予你300的工资》,阴的没边了
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
昨天 14:35
点赞 评论 收藏
分享
评论
点赞
3
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务