JavaScriptthis指向https://www.cnblogs.com/pssp/...call,Apply,Bindhttps://www.cnblogs.com/pssp/...prototype,原型链{functionPerson(){}Person.prototype.name='小明'letperson=newPerson()console.log(person.__proto__==Person.prototype)//trueconsole.log(Person.prototype.constructor==Person)//true//顺便学习一个ES5方法,可以得到对象的原型console.log(Object.getPrototypeOf(person)===Person.prototype)//trueconsole.log(person.name)//'XiaoMing'console.log(person.__proto__.name)//'XiaoMing'}当读取对象的属性时,JavaScript引擎首先查找对象的属性对象本身,如果没有找到,就去它的原型中找,如果还是找不到,就去原型的原型中找。如果直到最顶层都没有找到Object.prototype,则返回undefined。如果对象本身和它的原型都定义了一个同名的属性,那么就先读取对象本身的属性,这叫做“覆盖”。请注意,向上一级,在整个原型链上寻找某个属性会对性能产生影响。您要查找其属性的原型对象越高,对性能的影响就越大。如果要查找一个不存在的属性,则会遍历整个原型链。作者:废柴码农https://www.jianshu.com/p/30a...classclass{classAnimal{constructor(name,age){this.name=namethis.age=age}sleep(){返回'??zZZ~'}}Object.assign(Animal.prototype,{todo(){console.log('bark')},type:'dd'})letcat=newAnimal('cat','3')classBirdextendsAnimal{constructor(name,age){super(name,age)}fly(){console.log('flying...')}}letmaque=newBird('Sparrow',1)maque}https://es6.ruanyifeng.com/#d...异步https://github.com/ElemeFE/no...①Promise②Async/awaitmacro-taskandmicro-taskmacro-task(macro-task):includeOverallcodescript,setTimeout,setIntervalmicro-task(微任务):Promise,process.nextTickconsole.log('1');setTimeout(function(){console.log('2');process.nextTick(function(){console.log('3');})newPromise(function(resolve){console.log('4');resolve();}).then(function(){console.log('5')})})process.nextTick(function(){console.log('6');})newPromise(function(resolve){console.log('7');resolve();}).then(function(){console.log('8')})setTimeout(function(){console.log('9');process.nextTick(function(){console.log('10');})newPromise(function(resolve){console.log('11');resolve();}).then(function(){console.log('12')})})//Output:1,7,6,8,2,4,3,5,9,11,10,12Promise在setTimeout()之前执行,因为Promise定义后会立即执行,然后.then()在微任务中是异步的。而setTimeout()是一个异步宏任务。https://blog.csdn.net/zlzbt/a...https://zhuanlan.zhihu.com/p/...let和var的区别是constvar不能用来定义常量;var可以重复声明变量;var有变量提升;var不支持块级作用域regularhttps://juejin.im/post/596594...什么是跨域请求?如何允许跨域?对不同主机的请求称为跨域请求,可以通过设置CORS头即Access-Control-Allow-系列来允许跨域cookie和session的区别?服务器如何清除cookies?主要区别在于会话存在于服务器上,cookie存在于客户端上。会话比cookie更安全。而cookies可能并不总是可用(可能会被浏览器关闭)。服务器可以通过设置cookie的值为空并设置一个及时的过期时间来清除客户端的cookie。module.exports和exports的区别说明exports是一个Reference,直接赋值给它,只是让这个变量等于另一个reference,所以只有通过module.exports才能真正并行地修改exports本身,并发(Concurrent)=2个队列对应1台咖啡机。并行(Parallel)=2个队列对应2台咖啡机。Node.js并行可以通过集群实现https://www.jianshu.com/p/078...https://github.com/ElemeFE/no...ES6/7/8https://www.jianshu.com/p/390a65d7a353其他https://github.com/HerbertKarajan/Fe-Interview-questionsTypeScriptCsshttps://github.com/haizlin/fe-interview/blob/master/category/css.mdVueSlots其他https://www.cnblogs.com/wangking/p/9598899.htmlWebhttps://github.com/HerbertKarajan/Fe-Interview-questions/tree/master/21-Front-end-Interview-questionsHTML+CSS+JS+ES6+Webpack+Vue+React+Node+HTTPS+数据结构和算法+Githttps://github.com/biaochenxuying/blog/blob/master/interview/fe-interview.mdDocker,zookeeper,rabbitmq/kafka,socketio,cluster,redis,postgresql
