明略科技前端一面面经(46min)

1、vue响应式原理
2、了解$set
3、Object.assign深拷贝还是浅拷贝
4、手写深拷贝
5、实现倒三角形
6、let、const、var的区别
7、ES6去重和去重
8、原型链
9、遍历数组的时候如何跳出循环、聊聊for in for of
10、防抖、节流,有什么缺点(想手写一个的,面试官说不用)
11、promise是否会输出d(考察catch的返回值)

Promise.reject(2).catch(e => e).then(d => {
    console.log(d)
}

12、求输出

const p1 = new Promise((resolve, reject) => {
        resolve('hello')
    }).then(result => result)
    .catch(e => e)

const p2 = new Promise((resolve, reject) => {
    throw new Error('报错了')
}).then(result => result)

Promise.all([p1, p2])
.then(result => console.log(result))
.catch(e => console.log(e))

13、求输出

const p1 = new Promise((resolve, reject) => {
        resolve('hello')
    }).then(result => result)
    .catch(e => e)

const p2 = new Promise((resolve, reject) => {
    throw new Error('报错了')
}).then(result => {
    result
})
.catch(e => e)

Promise.all([p1, p2])
.then(result => console.log(result))
.catch(e => console.log(e))

14、求输出

function Foo() {
    getName = function () {
        alert(1);
    };
    return this;
}
Foo.getName = function () {
    alert(2);
};
Foo.prototype.getName = function () {
    alert(3);
};
var getName = function () {
    alert(4);
};

function getName() {
    alert(5);
}
Foo.getName()
getName();
Foo().getName()

15、聊聊什么是无状态协议
16、同源的不同页面间如何传递数据
17、缓存
18、三次握手的意义
女面试官超级nice!全程她都是笑哈哈的。

#实习##面经##明略科技##前端工程师#
全部评论
老哥,你是什么笔试的哇?
点赞 回复
分享
发布于 2020-12-01 17:31
我今天刚投,好慌。我跨专业学的没有项目可以讲。
点赞 回复
分享
发布于 2020-12-02 19:52
滴滴
校招火热招聘中
官网直投
楼主是微信面的吗
点赞 回复
分享
发布于 2020-12-08 12:23
有没有后续的同学 蹲一个
点赞 回复
分享
发布于 2020-12-09 15:44

相关推荐

1 19 评论
分享
牛客网
牛客企业服务