当前位置: 首页 > 面试经验 >

携程前端一面

优质
小牛编辑
61浏览
2024-06-01

携程前端一面

面试官真的很不错,有在交流的感觉,收获还是很大的,分享出来共同进步。

记一下能记住的,全程大概45分钟

* 你对虚拟dom是怎么理解的

* 服务端渲染和客户端渲染

改变this指向的方法

*看输出,面试官给我讲解了

class Parent {
  getName (){
    console.log(`Parent:${this.name}`);
  }
}

class Child extends Parent{
  constructor(name){
    super();
    this.name = name;
  }
  getName(){
    console.log(`Child:${this.name}`);
  }
}

let {getName} = new Child('trip')//this丢失
let fn = new Child('trip')
console.log(Parent.prototype.getName.call())//如果要输出Parent:trip。或换成箭头函数定义父的getName

* 实例方法和原型方法

回流和重绘的区别

触发BFC的方式

原型和原型链

用过哪些布局

同源是什么

* 用过那些隐藏元素的方法(实际上还可以回答将元素位置设在负屏幕外实现隐藏)

对宏任务和微任务的认识

项目过程中有遇到什么难点吗

版本管理工具有使用过吗

 类似资料: