美团面试总结1

这篇博客汇总了前端面试中常见的问题,包括Vue的nextTick、keep-alive的原理、JavaScript遍历技巧、Vue的EventBus实现、React Fiber、Node.js模块引入、HTTPS安全性、首页渲染时间计算等,还涉及到了浏览器缓存机制、HTML新标签、BFC、CSS布局、JavaScript数据类型检测等技术点,以及Electron通信和浏览器私有API的使用。
摘要由CSDN通过智能技术生成
(1)简单理解Vue中的nextTick?

https://www.jianshu.com/p/a7550c0e164f

(2)keep-alive是如何实现的?

https://www.jianshu.com/p/f3c52707656a

(3)js遍历JSON

https://www.cnblogs.com/qingqingzou-143/p/7079725.html

(4)js遍历树

https://www.cnblogs.com/cangqinglang/p/11307369.html

(5)Vue中EventBus的实现

https://www.jianshu.com/p/8e4084041a8b

https://www.cnblogs.com/singerlee-changealive/p/10519822.html

https://segmentfault.com/a/1190000013636153

(6)别人面试记录

https://zhuanlan.zhihu.com/p/112254085
https://zhuanlan.zhihu.com/p/84087044

(7)Vue3新特性

github 地址:https://github.com/vuejs/vue-next
1- 支持 ES5+;
2- IE11下不支持;

总结:
https://segmentfault.com/a/1190000020933028

(8)react fiber

https://www.jianshu.com/p/ff32dea870ed

(9)node 引入一个模块的过程是什么

https://blog.csdn.net/weixin_30292843/article/details/99048946

(10)https 如何保证证书是可信任的

https://segmentfault.com/a/1190000020653571?utm_source=tag-newest

(11)计算首页渲染时间

1.只利用前端技术(HTML、CSS、JavaScript),如何对网页的打开时间进行统计?
2.除了DOM ready 和 window onload 外,还有哪些节点有统计的价值?
3.具体有哪些实现方案和库?

  1. Web performance APIs ,可以得到各种时间比如dns解析时间、连接时间、跳转时间、加载时间等指标,具体请自行查资料,不赘述。
  2. 浏览器的私有API,比如 chrome.loadTimes()
  3. DOM ready/load 事件
  4. 白屏时间(first paint time)
  5. 首屏时间(Above-the-fold time)
(12)Accept 头部的作用什么,如果服务器不支持怎么办

https://blog.csdn.net/weixin_34238642/article/details/85925617

(13)你遇到过什么有挑战的事情吗 (这个一定得想好呀,没有也得憋出来一个)
(14)你对未来的工作有什么样的期待
(15)electron ipc通信

https://www.jianshu.com/p/7f1002c281e2

(16)深入理解浏览器的缓存机制

https://www.jianshu.com/p/54cc04190252

(17)深入理解浏览器的缓存机制

https://www.jianshu.com/p/54cc04190252

(18)HTML常见的行内元素?block inline-block inline的区别?

a,abbr,em,sub,sup,u,b,strike,span,select,input,br,i,textarea

block:独占一行,可以设置宽高,自动填满父元素高度,可以设置margin padding

inline-block:与其他行内元素占一行,可以设置宽高,可以设置margin padding

inline:不会独占一行,不可以设置宽高,可以设置margin padding

(19)H5新增了哪些标签?input新增了哪些类型?

footer,header,section,nav,aside,article,video,audio,canvas,time,hgroup,figure,figcaption,mark,keygen,summary

text,password,button,submit,file,url,email,required,radio,checkbox,date,time,month,week,color

(20)什么是BFC?什么情况会产生BFC?

BFC:块级格式化上下文,与外界元素互不影响,是一个隔离的独立容器

1、浮动元素
2、绝对定位
3、display:inline-block,table-cell,table-caption flex
4、overflow不为visible

(21)垂直水平居中的方法:

1、绝对定位。top:50%,left:50%,margin-left:-width/2,margin-top:-height/2

2、绝对定位。left:50%,top:50%,transform:translateX(-50%) translateY(-50%);

3、flex布局。父元素:display:flex,justify-content:center,align-items:center

4、table-cell 父元素:display:table-cell,text-align:center,vertical-align:middle

5、绝对定位,margin:auto,top:0,bottom:0,left:0,right:0

(22)写出程序运行结果?

console.log(typeof(null)):object

console.log(typeof(undefined)):undefined

console.log(typeof(NAN)):undefined

console.log(NAN == undefined):NAN is not defined

console.log(1+2+‘3’+4):334

var str = ‘12345f’;

console.log(typeof(str++)):Number

console.log(‘str’== new String(‘str’)):false

(23)代码
var x=1,y=0,z=0;
var add=function(x){
   
	 return x = x+1;
}
y=add(x);
function add(x){
   
	 return x=x+3;
}
z = add(x);
console.log(x,y,z)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值