A部门一面凉经

自我介绍
怎么学前端
两边定宽的⚪、两头自适应。三列布局,两端为半径为50px的圆,两头内容宽度自适应。(我写的答复↓)

<!DOCTYPE html><html lang="en"><head>    <meta charset="UTF-8">    <meta http-equiv="X-UA-Compatible" content="IE=edge">    <meta name="viewport" content="width=device-width, initial-scale=1.0">    <title>Document</title></head><style>    .container {        display: flex;        width: 150px;        height: 100px;    }.box1 {    width: 100px;    height: 100%;    background-color: red;    border-radius: 50px;    flex-shrink: 0;}.box3 {    width: 100px;    height: 100%;    background-color: yellow;    border-radius: 50px;    flex-shrink: 0;}.box2 {    height: 100%;    background-color: green;    flex-grow: 1;}</style><body>    <div class="container">        <div class="box1"></div>        <div class="box2"></div>        <div class="box3"></div>    </div></body></html>

类型判断,怎么判断null
var a = null

console.log(a == Object);//falseconsole.log(a == null)//true

根本数据类型有哪些
援用数据类型有哪些
es6新增的数据类型:promise、symbol、
联合事件循环讲一下promise
vue事件绑定的原理
vue数据监听的原理
强缓存和帮助缓存
for循环外面setstate
biteint是什么?
返回402是什么
缓存机制、不要缓存

实现一个bigNumber类型,反对加减法运算。
给定一个链表,有环则返回环的第一个节点,无环则返回null

箭头函数、一般函数:const foo = {fn: function (){console.log(this);}}const bar = {fn: () => {console.log(this);}}const f = foo.fn;f(); foo.fn(); const b = bar.fn;b();bar.fn();

实现一个bigNumber类型,反对加减法运算。
给定一个链表,有环则返回环的第一个节点,无环则返回null。代码实现

字节官网介绍对前端的考查

  • 对前端开发岗而言,哪些专业知识比拟match

    • html css基础知识

      • 简略的布局,定位 等基础知识。
    • js根底能力

      • 原型原型链,函数闭包,函数科里化,js作用域this指向,js事件队列。
      • es6,es7 罕用语法:promise,数组、对象新办法 等。
      • 数据结构,数组对象、相干办法的应用。
      • 事件捕捉和冒泡,事件代理,跨域。
    • 浏览器

      • 缓存,浏览器存储,iframe,前端性能监控。
    • 至多熟练掌握一门前端开发框架及配套

      • vue/react/angular
      • 路由vue-router/react-router
      • 数据管理vuex/mobx/redux
    • 前端工程化 webpack/gulp的应用

B部门实习生一面

如何打乱数组,代码实现(我写的是洗牌算法)

如何把下面写的算法以数组办法的模式实现(我的思路是放在原型对象)数组原型对象取得数组的值(间接在原型对象的办法用this能够获取调用办法的对象的值)let test=[1,2,6,4]arry_sort(test)test.arry_sort()Array.prototype.arry_sort=arry_sortarry_sort(test){test}arry_sort(){ ????}

map的用法
介绍一下cookie、localStorage和其余存储形式
用代码考查padding、margin和top的了解(margin不会笼罩父元素的padding,会相加。相对定位是绝对于父元素的内容区,top、left的优先级高于子元素的margin)

<style>    .wrapper {        width: 200px;        height: 200px;        padding: 10px;        position: relative;        top: 200px;        left: 200px;        background-color: black;    }    .div1 {        width: 100px;        height: 100px;        margin: 10px;        position: absolute;        top: 30px;        background-color: red;    }</style><body>    <div class="wrapper">        <div class="div1"></div>    </div></body>

所有状态码(因为我是网工业余的)
1**信息,需请求者继续执行操作
2**胜利,被胜利承受并解决
3**重定向
4**客户端谬误,蕴含语法错误和无奈实现申请
5**服务器谬误

let和var的区别
强缓存和帮助缓存

如何实现三角形?(我写的是用border实现的,但面试官问我怎么用canvas实现,上面是我预先从新学完后写的代码)var canvas = document.getElementById('test')if(!canvas.getContext) return;var ctx = canvas.getContext('2d');ctx.beginPath();ctx.moveTo(50,50);ctx.lineTo(200,50)ctx.lineTo(200,200)ctx.fill()

执行上下文,事件循环

二路归并排序
疾速排序
输出n块钱,不限数量,输入所有用1元、2元、5元组成n块钱的数组

B部门实习生二面

疾速排序算法(有什么优化计划,什么状况下工夫复杂度最差,怎么优化呈现的这种状况)
c++,java和js的区别是什么
对进来咱们部门有什么预期,感觉会做什么