Interview icon indicating copy to clipboard operation
Interview copied to clipboard

【04-26】😋 W公司

Open buuing opened this issue 3 years ago • 0 comments

! 10-10-5 工作制

笔试题 30分钟

  1. 问输出什么
var name = 1
var obj = {
  name: 2,
  prop: {
    name: 3,
    getName: function () {
      setTimeout(function showName () {
        console.log(this.name)
      }, 1000)
      return this.name
    }
  }
}
console.log(obj.prop.getName())
var getName = obj.prop.getName
console.log(getName())
  1. ~问输出什么~
(function () {
  console.log(1)
  setTimeout(() => console.log(2), 1000)
  setTimeout(() => console.log(3), 0)
  console.log(4)
})();
  1. ~没啥技术含量, 就一个Promise.all的应用, 懒得写了~
  2. ~手写一个深拷贝~
  3. ~实现add函数, 如: add(1)(2); add(1, 2)(3)~

一面 35分钟

  1. ~说一下vue的生命周期, 在不同阶段vue做了哪些事~
  2. ~有用过vue3吗, 说一下vue3做了哪写优化~
  3. ~项目中vuex用的多吗, 为什么要使用vuex呢~
  4. ~vue-router原理说一下~
  5. ~vue组件之间的通信方式~
  6. ~webpack用到的多吗~
  7. ~平时项目中有对项目做过哪些优化吗~
  8. 项目中有做过线上错误日志收集之类的吗
  9. ~说一下跨域, 为什么会出现跨域呢, 跨域请求是否可以被服务端接收到~
  10. ~call / apply / bind之间有什么不同, 手写一个bind方法~
  11. ~原型和原型链介绍一下~
  12. ~手写实现(2).add(4)得到6, (1).add(2)得到3~
  13. 问输出什么
Promise.resolve('foo')
  .then(Promise.resolve('bar'))
  .then(res => console.log(res))
  1. ~问输出什么~
console.log(1)
let p = new Promise(resolve => {
  console.log(2)
  resolve()
  console.log(3)
})
async function fn () {
  console.log(4)
  await p.then(() => console.log(6))
  console.log(7)
}
fn()
setTimeout(() => console.log(8))
console.log(5)
  1. ~实现一个sleep(1000)函数~
  2. CMD和UMD的区别是什么
  3. ~在项目中开发过一些UI组件吗~
  4. vue路由中的按需加载用过吗, 内部实现原理了解吗

二面 30分钟

  1. ~开源项目的设计思路和相关API~
  2. ~ts里面的typeinterface有什么区别~
  3. ~问了点this指向的相关问题~
  4. ~平时一般会通过什么方式去自学~
  5. ~问输出什么~
setTimeout(() => console.log(1))
new Promise(resolve => {
  resolve()
  console.log(2)
}).then(() => console.log(3))
console.log(4)
  1. ~setTimeoutsetInterval区别, setInterval会有哪些问题~
  2. 写过webpack插件吗
  3. ~这个小程序有没有去了解过他的原理~
  4. ~设计模式了解吗, 发布订阅模式可以写个伪代码吗~
  5. ~MapWeakMap之间有什么区别~
  6. ~关于js在浏览器运行时阶段, V8引擎做过哪方面的优化~
  7. ~说一下http常见的状态码~
  8. ~近几年个人规划和职业规划是什么~

三面 [远程] 37分钟

  1. ~贡献屏幕, 解一道题~
// 假设本地机器无法做加减乘除法,需要通过远程请求让服务端来实现。
// 以加法为例,现有远程API的模拟实现
const addRemote = async (a, b) => new Promise(resolve => {
  setTimeout(() => resolve(a + b), 1000)
})

// 请实现本地的add方法,调用addRemote,能最优的实现输入数字的加法。
async function add(...inputs) {
  // 你的实现
}

// 请用示例验证运行结果:
add(1, 2).then(result => console.log(result)) // 3
add(3, 5, 2).then(result => console.log(result)) // 10
  1. ~介绍一下你的项目~
  2. ~说一下async/await底层是如何实现的~, 可以手写吗
  3. 那你说一下babel的编译原理
  4. AST抽象语法树你了解多少
  5. ~你们是如何搭建的项目 (cli脚手架)~
  6. 你开发过cli的脚手架工具吗
  7. ~webpack你使用过哪些配置~
  8. ~webpack的devServer底层是如何实现跨域的~
  9. ~什么情况下会出现跨域~
  10. 如果是后端去调用其他接口, 会触发跨域吗
  11. webpack的Tree-shaking是如何实现按需加载的
  12. webpack里面的hash有多少种
  13. 那contenthash和chunkhash都有什么区别
  14. ~webpack的hash有什么作用~
  15. 浏览器什么情况下会对资源进行缓存
  16. 你一般会如何设置浏览器缓存, 详细说一些配置参数
  17. 304这个状态码, 除了命中协商缓存, 还会有别的情况吗
  18. ~http状态码, 301和302之间有什么区别, 何时会发生缓存~
  19. ~如果是http跳转https, 你会选择哪种重定向~
  20. ~vue3使用过吗, vue3和vue2有哪些主要的区别, vue3新特性~
  21. 使用过版本号自动管理, 自动发布流程吗
  22. ~为什么会想要跳槽离职呢~
  23. ~你还有什么想问的吗~

四面 [远程] 20分钟

  • 换了个部门就简单聊了聊, 没问技术, 就瞎聊

E轮融资, 马上上市, 但是最高只能给到(n)k*14薪, 可惜了

早上10点到晚上10点, 虽然是双休, 但是感觉业余学习时间就不剩什么了

buuing avatar May 28 '21 15:05 buuing