me
promise 的用法(高频)
promise 实现原理:promise 的本质是回调函数,then 方法的本质是依赖收集,它把 fulfilled 状态要执行的回调函数放在一个队列, rejected 状态要执行的回调函数放在另一
lhh|07/31/2024 14:55
me
箭头函数和普通函数的区别
this.id = "global"; console.log("this.id :>> ", this.id); // this.id :>> global function normalFun
lhh|07/31/2024 14:55
me
https 和 http
http 状态码
lhh|07/31/2024 14:54
me
js 事件循环
js 是单线程语言,首先会执行 script 中的同步代码,然后中途遇到微任务就放到微任务队列中,遇到宏任务就放到事件队列中,同步代码执行完,事件循环就会执行微任务,当微任务队列为空后,就又继续从事件
lhh|07/31/2024 14:54
me
闭包
“定义在一个函数内部的函数”。内部的函数可以访问外部函数的变量。闭包的实质是因为函数嵌套而形成的作用域链闭包的定义即:函数 A 内部有一个函数 B,函数 B 可以访问到函数 A 中的变量,那么函数 B
lhh|07/31/2024 14:54
me
判断题
NaN == NaN; // false NaN === NaN; // false null == undefined; // true null === undefined; // false
lhh|07/31/2024 14:53
me
数据类型
基本数据类型引用数据类型typeof 的返回数据类型:undefined,string,boolean,number,symbol(ES6),Object,Functiontypeof 用于确定基本数
lhh|07/31/2024 14:52
博主很懒,就这么多啦~~