富途证券(架构组)一面

离职原因

想加入什么样的团队

你开发过什么组件?

优化过 webpack 的性能?

做过什么?

讲一下 ts 的重载?以及为什么需要用重载?

组件库在迁移的过程中有什么难搞的问题?

做过移动端的开发吗?

了解移动端的设备适配问题吗?

finally 在 IOS 8 用不了的原因是什么?

下面这段代码有什么问题

    function Father() {
      this.property = true
    }
    Father.prototype.getFatherValue = function() {
      return this.property
    }
    
    function Son() {
      this.sonProperty = false
    }
    
    // 继承
    Son.prototype = new Father()
    Son.prototype.getSonValue = function() {
      return this.soneProperty
    }
    var instance = new Son()

描述一下原型、构造函数、实例之间的关系

说一下 instanceof 的原理

怎样判断类型

下面代码输出什么

    function F() {}
    F.prototype.arr = [1]
    F.prototype.b = 1
    
    let obj1 = new F()
    obj1.arr.push(2)
    obj1.b = 2
    
    let obj2 = new F()
    console.log(obj2.arr, obj2.b)

下面代码输出什么

    setTimeout(function() {
      console.log(1)
    }, 0)
    
    new Promise(function (resolve) {
      console.log(2)
      for(var i = 0; i < 10000; i++) {
        i == 9999 && resolve()
      }
      console.log(3)
    }).then(function () {
      console.log(4)
    })
    console.log(5)

地址栏输入URL到页面渲染发生了什么

介绍一下强缓存和协商缓存

HTTPS 能不能做一个中间层,在中间层之间做劫持?有办法避免吗

在 a.com 中能发送一个 ajax 请求到 b.com 吗?

如何避免页面被别人的 iframe 页面嵌套

XSS防御

除了 XSS 以外,还有什么安全问题

假设你的页面加载非常慢,你会怎么判断问题出现在哪?如果是普遍的网络问题,怎样解决?如果不是网络问题,怎么解决?

算法题

    // a,b 2个有序数组,a的长度小于等于b
    // 元素都是整数
    // 存在重复元素
    // 判断a是否为b的子集
    // 例如:
    // a: [1, 2, 3] b: [1, 2, 3, 4] 属于
    // a: [1, 1, 2, 2] b: [1, 2, 3, 4] 不属于
Last Updated:
Contributors: leeguooooo