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

字节前端实习一面 4.24

优质
小牛编辑
27浏览
2023-04-30

字节前端实习一面 4.24

50min

  • 怎么学前端的
  • 写一个bind, new bind 过后的函数 this 的问题
Function.prototype.myBind = function(obj, ...args) {
  const fn = this
  return function (...rest){ fn.call(obj, ...args, ...rest)}
}

//new的时候应该指向新创建的空对象怎么解决
Function.prototype.mybind = function (ctx, ...args) {
  const fn = this

  const bindFn = function (...rest) {
    if(this instanceof bindFn){//new 的情况
      return new bindFn(this, ...args, ...rest)
    }
    return fn.call(ctx, ...args, ...rest)
  }
  return bindFn
}
  • 手写promise.all
  • 二叉树层序遍历
  • var 变量提升
  • var let const
  • map 和 set 区别 map.set()两次symbol会怎样
  • 关于this 输出题
var a = function(){this.b = 3}
c = new a()
a.prototype.b = 9
var b = 7
a()
console.log(b)//3
console.log(c.b)//3
  • SSR 的理解
  • 怎么解决React重复渲染 memo 应用场景 第二个参数
  • 事件循环
  • 项目相关
  • 后面10min聊天

4.26 hr说过了 约二面

4.28 二面

1.

const arr = [{a:2}, {a:2}, {a:2, b:1}, {a:{b:1, c:{a:1}}},{a:{b:1, c:{a:1}}}]
去重
不能用json.stringfy()

2.事件循环输出

3.手写jsx转化为React.createElement

4 http和https区别

5 五层模型

6 MAC地址

7 网络层有哪些协议(只答上IP, ICMP)

面试官要开会就没问太多

他最后说因为我是非科班的,要补补计算机基础,(但又不是很急迫)

一面答的挺好的,二面比较差一些,(但算法都写出来了)

这是有希望还是g了啊

#面经##暑期实习##字节##复盘面经#
 类似资料: