关于面试大前端node全栈面试

6次阅读

共计 1384 个字符,预计需要花费 4 分钟才能阅读完成。

this 指向

https://www.cnblogs.com/pssp/…

call、Apply、Bind

https://www.cnblogs.com/pssp/…

异步

https://github.com/ElemeFE/no…
① Promise
② Async/await

setTimeout 和 Promise 的执行顺序

Promise 比 setTimeout() 先执行。因为 Promise 定义之后便会立即执行,其后的.then() 是异步里面的微任务。而 setTimeout() 是异步的宏任务。
https://blog.csdn.net/zlzbt/a…
https://zhuanlan.zhihu.com/p/…

let 和 var 区别,const

var 不能用于定义常量;var 可以重复声明变量;var 存在变量提升;var 不支持块级作用域

正则

什么是跨域请求? 如何允许跨域?

向不同 host 的请求被称作跨域请求,可以通过设置 CORS headers 即 Access-Control-Allow- 系列来允许跨域

cookie 与 session 的区别? 服务端如何清除 cookie?

主要区别在于, session 存在服务端, cookie 存在客户端. session 比 cookie 更安全. 而且 cookie 不一定一直能用 (可能被浏览器关掉). 服务端可以通过设置 cookie 的值为空并设置一个及时的 expires 来清除存在客户端上的 cookie.

Class

module.exports 与 exports 的区别解释

exports 是一个引用,直接赋值给它,只是让这个变量等于另外一个引用,所以 只有通过 module.exports 才能真正修改到 exports 本身

并行、并发

并发 (Concurrent) = 2 队列对应 1 咖啡机.
并行 (Parallel) = 2 队列对应 2 咖啡机. node.js 并行可以通过 cluster 实现
https://www.jianshu.com/p/078…
https://github.com/ElemeFE/no…

Css

https://github.com/haizlin/fe-interview/blob/master/category/css.md

JS

https://github.com/HerbertKarajan/Fe-Interview-questions

Vue

https://www.cnblogs.com/wangking/p/9598899.html

Web

https://github.com/HerbertKarajan/Fe-Interview-questions/tree/master/21-Front-end-Interview-questions

HTML + CSS + JS + ES6 + Webpack + Vue + React + Node + HTTPS + 数据结构与算法 + Git

https://github.com/biaochenxuying/blog/blob/master/interview/fe-interview.md

ES6/7/8

https://www.jianshu.com/p/390a65d7a353

Docker、zookeeper、rabbitmq/kafka、socketio、cluster、redis、postgresql

正文完
 0