下面按常见程度 + 考察点整理一份 ECMAScript(ES)常见面试题清单,覆盖初级到中高级,适合前端面试准备。
var、let、const 的区别const 对象属性是否可改string / number / boolean / null / undefined / symbol / bigintobject(含 array / function)typeof 的坑(typeof null === 'object')== 和 === 的区别[] == ![]、null == undefinedNumber()、String()、Boolean()for (var i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 0)
}
// 输出什么?如何用 let 解决?
this 的绑定规则prototype vs __proto__instanceof 原理instanceofclass extendsconst { a, b = 2 } = obj
...rest 参数区别PromisePromise.all / race / allSettledPromise(常考)async / awaitconsole.log(1)
setTimeout(() => console.log(2))
Promise.resolve().then(() => console.log(3))
console.log(4)
curry?.??Symbol 用途Proxy vs Object.definePropertyBigInt 使用场景call / apply / bindnewdebounce / throttlePromise.alldeepClone如果你愿意,我可以:
你想从哪一块开始?
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。