面经3

微众银行

https://juejin.cn/post/6844903911548026893

工之易

  • 错误捕获
  • get post 反过来传参能拿到吗?

AutoX

  • 二叉树前序遍历
  • 多米诺骨牌遍历,找重复的对数 [1,2] 和 [2 ,1]是相同的

传奇交易(区块链)

  • ts 中的类型缩减
  • 前端模块块发展
  • commonjs es 区别 特点 为什么这么去做,词法分析 + 预编译

自我介绍英文版

尊敬的面试官您好,我是黄流川,我来自重庆,本科就读于河北燕山大学,之后去重庆大学攻读硕士学位,研究方向是车联网和智能车,因此接触到了计算机编程领域,经过开始这方面的不断自我学习,在学校经历过一个项目之后,投递了腾讯这边的前端开发实习,转正通过后返校完成毕业论文,从去年七月份开始参加工作至今

Respect of the interviewer, I am HLC, I come from chongqing, undergraduate study in hebei yanshan university, then go to chongqing university study for a master’s degree, the research direction is car networking and intelligent, so access to computer programming, through my constant self learning, I experienced a project in the school, after that I delivered the tencent of the front development practice (internship), I returned to school to finish my graduation thesis after I passed the full-time job (become a regular worker转正,答辩 reply, 员工 staff). I have been worked in Tencent From July last year to July this year

Finally, I hope I can successfully pass the interview and join your company, It would be my pleasure

JS隐式转化

1
["1", "0", "2", "4"].map(parseInt); //[ 1, NaN, NaN, NaN]

parseInt(string, radix)

  • string 必需。要被解析的字符串。
  • radix 可选。表示要解析的数字的基数。该值介于 2 ~ 36 之间。
    如果省略该参数或其值为 0,则数字将以 10 为基础来解析。如果它以 “0x” 或 “0X” 开头,将以 16 为基数。

for of和for in的区别,forEach和map的区别

  • for…of循环:具有 iterator接口,就可以用for…of循环遍历它的成员(属性值)。for…of循环可以使用的范围包括数组、Set 和 Map 结构、某些类似数组的对象、Generator 对象,以及字符串。for…of循环调用遍历器接口,数组的遍历器接口只返回具有数字索引的属性。对于普通的对象,for…of结构不能直接使用,会报错,必须部署了 Iterator 接口后才能使用。可以中断循环。
  • for…in循环:遍历对象自身的和继承的可枚举的属性, 不能直接获取属性值。可以中断循环。
  • forEach: 只能遍历数组,不能中断,没有返回值(或认为返回值是undefined)
  • map: 只能遍历数组,不能中断,返回值是修改后的数组

es5 类和es6中class的区别

  • class类必须new调用,不能直接执行
  • class类不存在变量提升
  • class类无法遍历它实例原型链上的属性和方法
  • new.target属性
    es6为new命令引入了一个new.target属性,它会返回new命令作用于的那个构造函数。如果不是通过new调用或Reflect.construct()调用的,new.target会返回undefined。
1
2
3
4
5
6
7
8
9
10
function Person(name) {
if (new.target === Person) {
this.name = name;
} else {
throw new Error('必须使用 new 命令生成实例');
}
}

let obj = {}
Person.call(obj, 'red') // 此时使用非new的调用方式就会报错
  • class类有static静态方法

static静态方法只能通过类调用,不会出现在实例上;另外如果静态方法包含 this 关键字,这个 this 指的是类,而不是实例。static声明的静态属性和方法都可以被子类继承。

1
2
3
4
5
6
7
8
9
10
11
12
13
class Foo {
static bar() {
this.baz(); // 此处的this指向类
}
static baz() {
console.log('hello'); // 不会出现在实例中
}
baz() {
console.log('world');
}
}

Foo.bar() // hello
  • ES6 class 子类必须在父类的构造函数中调用super(),这样才有this对象;ES5中类继承的关系是相反的,先有子类的this,然后用父类的方法应用在this上

订阅发布模式和观察者模式的区别

发布订阅:灵活,解耦,因为多了事件中心; 代码不好维护,性能消耗大(react)
观察者模式:响应式,不灵活(vue)

浏览器兼容性问题

https://juejin.cn/post/6844904004556685319


面经3
http://example.com/2023/04/24/面经3/
作者
lyric
发布于
2023年4月24日
许可协议