⚡ JavaScript

共 141 道题目

#1 初级 ES5

JavaScript 中有哪些基本数据类型 (Primitive Types)?

What are the primitive data types in JavaScript?

**What are the primitive data types in JavaScript?**
- *考察点:基础知识的掌握。*
#2 初级 ES5

== 和 === 有什么区别?

What is the difference between == and ===?

**What is the difference between == and ===?**
- *考察点:对类型转换和严格比较的理解。*
#3 初级 ES5

什么是作用域 (Scope)?JavaScript 中的作用域有几种?

What is scope? How many types of scope are there in JavaScript?

**What is scope? How many types of scope are there in JavaScript?**
- *考察点:对变量可访问性规则的理解。*
#4 初级 ES5

什么是变量提升 (Hoisting)?

What is hoisting?

**What is hoisting?**
- *考察点:对 JavaScript 代码执行顺序的理解。*
#5 初级 ES5

typeof 操作符的返回值有哪些?

What are the possible return values of the typeof operator?

**What are the possible return values of the typeof operator?**
- *考察点:对数据类型检测方法的掌握。*
#6 初级 ES5

null 和 undefined 的区别是什么?

What is the difference between null and undefined?

**What is the difference between null and undefined?**
- *考察点:对特殊值的理解和使用场景。*
#7 初级 ES5

什么是 falsy 值?JavaScript 中有哪些 falsy 值?

What are falsy values? What falsy values exist in JavaScript?

**What are falsy values? What falsy values exist in JavaScript?**
- *考察点:对布尔转换规则的理解。*
#8 初级 ES5

如何检测一个变量是否为数组?

How to detect if a variable is an array?

**How to detect if a variable is an array?**
- *考察点:数组检测方法的掌握。*
#9 初级 ES5

JavaScript 中的原始类型和引用类型有什么区别?

What is the difference between primitive types and reference types in JavaScript?

**What is the difference between primitive types and reference types in JavaScript?**
- *考察点:对内存分配和数据传递方式的理解。*
#10 初级 ES5

什么是函数声明和函数表达式?它们有什么区别?

What are function declarations and function expressions? What are their differences?

**What are function declarations and function expressions? What are their differences?**
- *考察点:对函数定义方式的理解。*
#11 初级 ES5

for...in 循环是做什么的?使用时需要注意什么?

What does the for...in loop do? What should be noted when using it?

**What does the for...in loop do? What should be noted when using it?**
- *考察点:对象遍历和原型链的基础理解。*
#12 初级 ES5

JavaScript 中的字符串是可变的吗?

**Are strings mutable in JavaScript?**
- *考察点:对字符串特性的理解。*
#13 初级 ES5

什么是 parseInt() 和 parseFloat()?它们的区别是什么?

What are parseInt() and parseFloat()? What are their differences?

**What are parseInt() and parseFloat()? What are their differences?**
- *考察点:数据类型转换方法的掌握。*
#14 初级 ES5

什么是全局变量?使用全局变量有什么问题?

What are global variables? What problems can arise from using global variables?

**What are global variables? What problems can arise from using global variables?**
- *考察点:变量作用域和代码质量意识。*
#15 初级 ES5

JavaScript 中如何创建对象?有哪些方式?

How to create objects in JavaScript? What methods are available?

**How to create objects in JavaScript? What methods are available?**
- *考察点:对象创建方法的基础掌握。*
#1 中级 ES5

请解释 this 关键字在不同场景下的指向。

**Please explain how the 'this' keyword behaves in different scenarios.**
- *考察点:JavaScript 中最核心也最复杂的概念之一。*
#2 中级 ES5

什么是闭包 (Closure)?它的应用场景有哪些?有什么缺点?

What is a closure? What are its use cases? What are its drawbacks?

**What is a closure? What are its use cases? What are its drawbacks?**
- *考察点:对词法作用域、内存管理和高级函数应用的理解。*
#3 中级 ES5

请解释原型 (Prototype) 和原型链 (Prototype Chain)。

**Please explain prototype and prototype chain.**
- *考察点:对 JavaScript 面向对象核心——原型继承的理解。*
#4 中级 ES5

如何实现一个 bind 函数?

How to implement a bind function?

**How to implement a bind function?**
- *考察点:综合运用 this、apply、闭包和高阶函数等知识,代码实现能力。*
#5 中级 ES5

call、apply 和 bind 的区别是什么?

What are the differences between call, apply, and bind?

**What are the differences between call, apply, and bind?**
- *考察点:函数调用方式和上下文绑定的理解。*
#6 中级 ES5

什么是作用域链 (Scope Chain)?它是如何工作的?

What is the scope chain? How does it work?

**What is the scope chain? How does it work?**
- *考察点:对变量查找机制和执行上下文的理解。*
#7 中级 ES5

什么是立即执行函数表达式 (IIFE)?它的作用是什么?

What is an Immediately Invoked Function Expression (IIFE)? What is its purpose?

**What is an Immediately Invoked Function Expression (IIFE)? What is its purpose?**
- *考察点:模块化和作用域隔离的理解。*
#8 中级 ES5

JavaScript 中的继承有哪些实现方式?

What are the different ways to implement inheritance in JavaScript?

**What are the different ways to implement inheritance in JavaScript?**
- *考察点:面向对象编程和继承模式的掌握。*
#9 中级 ES5

什么是构造函数?new 操作符做了什么?

What is a constructor function? What does the 'new' operator do?

**What is a constructor function? What does the 'new' operator do?**
- *考察点:对象创建过程和构造函数原理的理解。*
#10 中级 ES5

如何实现深拷贝?

How to implement deep copy?

**How to implement deep copy?**
- *考察点:对象复制和递归算法的理解。*
#11 中级 ES5

什么是函数式编程?JavaScript 中如何实现?

What is functional programming? How to implement it in JavaScript?

**What is functional programming? How to implement it in JavaScript?**
- *考察点:编程范式和高阶函数的理解。*
#12 中级 ES5

什么是柯里化 (Currying)?如何实现?

What is currying? How to implement it?

**What is currying? How to implement it?**
- *考察点:函数式编程技巧和闭包应用。*
#13 中级 ES5

什么是防抖 (Debounce) 和节流 (Throttle)?如何实现?

What are debounce and throttle? How to implement them?

**What are debounce and throttle? How to implement them?**
- *考察点:性能优化和事件处理的理解。*
#14 中级 ES5

JavaScript 中的垃圾回收机制是什么?

What is the garbage collection mechanism in JavaScript?

**What is the garbage collection mechanism in JavaScript?**
- *考察点:内存管理和性能优化的理解。*
#15 中级 ES5

什么是执行上下文 (Execution Context)?

What is execution context?

**What is execution context?**
- *考察点:代码执行机制的深入理解。*
#16 中级 ES5

什么是变量对象 (Variable Object) 和活动对象 (Activation Object)?

What are Variable Object (VO) and Activation Object (AO)?

**What are Variable Object (VO) and Activation Object (AO)?**
- *考察点:执行上下文内部机制的理解。*
#17 中级 ES5

严格模式 (Strict Mode) 是什么?有什么作用?

What is strict mode? What is its purpose?

**What is strict mode? What is its purpose?**
- *考察点:代码质量和语言特性的理解。*
#18 中级 ES5

如何检测对象的属性是否存在?有哪些方法?

How to detect if an object property exists? What methods are available?

**How to detect if an object property exists? What methods are available?**
- *考察点:对象属性操作和原型链的理解。*
#1 高级 ES5

请解释 JavaScript 的事件循环 (Event Loop) 机制。

**Please explain the JavaScript Event Loop mechanism.**
- *考察点:对 JavaScript 异步执行模型的宏观理解。*
#2 高级 ES5

在 ES5 中,你如何处理异步操作(例如,多个有依赖关系的 Ajax 请求)?

How do you handle asynchronous operations in ES5 (for example, multiple dependent Ajax requests)?

**How do you handle asynchronous operations in ES5 (for example, multiple dependent Ajax requests)?**
- *考察点:对传统异步解决方案(回调)及其问题的理解。*
#3 高级 ES5

什么是"回调地狱 (Callback Hell)"?如何解决它?

What is "Callback Hell"? How to solve it?

**What is "Callback Hell"? How to solve it?**
- *考察点:同上,但更侧重于问题的识别和解决方案。*
#4 高级 ES5

常见的内存泄漏场景有哪些?

What are the common memory leak scenarios?

**What are the common memory leak scenarios?**
- *考察点:对内存管理和性能优化的实战经验。*
#5 高级 ES5

什么是宏任务 (Macro Task) 和微任务 (Micro Task)?它们的执行顺序是什么?

What are macro tasks and micro tasks? What is their execution order?

**What are macro tasks and micro tasks? What is their execution order?**
- *考察点:事件循环的深入理解和异步任务优先级。*
#6 高级 ES5

如何实现一个完整的 Promise(ES5 语法)?

How to implement a complete Promise (using ES5 syntax)?

**How to implement a complete Promise (using ES5 syntax)?**
- *考察点:异步编程原理和状态机的实现。*
#7 高级 ES5

什么是模块化?ES5 中如何实现模块化?

What is modularization? How to implement modules in ES5?

**What is modularization? How to implement modules in ES5?**
- *考察点:代码组织和命名空间管理。*
#8 高级 ES5

如何实现一个观察者模式 (Observer Pattern)?

How to implement the Observer pattern?

**How to implement the Observer pattern?**
- *考察点:设计模式和事件驱动编程。*
#9 高级 ES5

如何实现一个发布订阅模式 (Pub/Sub Pattern)?

How to implement the Publish-Subscribe pattern?

**How to implement the Publish-Subscribe pattern?**
- *考察点:解耦和事件通信机制。*
#10 高级 ES5

什么是单例模式?如何在 JavaScript 中实现?

What is the Singleton pattern? How to implement it in JavaScript?

**What is the Singleton pattern? How to implement it in JavaScript?**
- *考察点:设计模式和对象创建控制。*
#11 高级 ES5

如何实现一个简单的 MVC 框架?

How to implement a simple MVC framework?

**How to implement a simple MVC framework?**
- *考察点:架构设计和代码组织能力。*
#12 高级 ES5

JavaScript 中的性能优化有哪些方法?

What are the performance optimization methods in JavaScript?

**What are the performance optimization methods in JavaScript?**
- *考察点:实际项目经验和性能调优。*
#13 高级 ES5

什么是函数记忆化 (Memoization)?如何实现?

What is memoization? How to implement it?

**What is memoization? How to implement it?**
- *考察点:缓存优化和算法改进。*
#14 高级 ES5

如何实现一个 JSON.stringify?

How to implement JSON.stringify?

**How to implement JSON.stringify?**
- *考察点:数据序列化和递归算法。*
#15 高级 ES5

如何实现一个 JSON.parse?

How to implement JSON.parse?

**How to implement JSON.parse?**
- *考察点:字符串解析和状态机设计。*
#16 高级 ES5

什么是尾调用优化?JavaScript 中如何避免栈溢出?

What is tail call optimization? How to avoid stack overflow in JavaScript?

**What is tail call optimization? How to avoid stack overflow in JavaScript?**
- *考察点:递归优化和内存管理。*
#17 高级 ES5

如何实现一个简单的模板引擎?

How to implement a simple template engine?

**How to implement a simple template engine?**
- *考察点:字符串处理和代码生成。*
#18 高级 ES5

什么是沙箱环境?如何实现 JavaScript 代码沙箱?

What is a sandbox environment? How to implement a JavaScript sandbox?

**What is a sandbox environment? How to implement a JavaScript sandbox?**
- *考察点:安全编程和代码隔离。*
#19 高级 ES5

如何检测和处理循环引用?

How to detect and handle circular references?

**How to detect and handle circular references?**
- *考察点:复杂数据结构处理和算法设计。*
#20 高级 ES5

什么是代理模式?如何在 ES5 中模拟实现?

What is the Proxy pattern? How to simulate it in ES5?

**What is the Proxy pattern? How to simulate it in ES5?**
- *考察点:设计模式和对象行为控制。*

---
#1 初级 ES6

ES6 新增了哪个基本数据类型?它有什么特点?

What new primitive data type was added in ES6? What are its characteristics?

**What new primitive data type was added in ES6? What are its characteristics?**
- *考察点:基础知识的掌握。*
#2 初级 ES6

let、const 和 var 有什么区别?

What are the differences between let, const and var?

**What are the differences between let, const and var?**
- *考察点:变量声明方式和作用域。*
#3 初级 ES6

什么是块级作用域?ES6 如何实现?

What is block scope? How does ES6 implement it?

**What is block scope? How does ES6 implement it?**
- *考察点:作用域理解与变量生命周期。*
#4 初级 ES6

箭头函数与普通函数的区别是什么?

What are the differences between arrow functions and regular functions?

**What are the differences between arrow functions and regular functions?**
- *考察点:语法特性与 this 指向。*
#5 初级 ES6

什么是模板字符串?有哪些用法?

What are template strings? What are their uses?

**What are template strings? What are their uses?**
- *考察点:字符串拼接与表达式插值。*
#6 初级 ES6

解构赋值是什么?可以用于哪些数据类型?

What is destructuring assignment? What data types can it be used with?

**What is destructuring assignment? What data types can it be used with?**
- *考察点:数组、对象解构语法。*
#7 初级 ES6

ES6 如何声明默认参数?与 ES5 有何不同?

How does ES6 declare default parameters? How is it different from ES5?

**How does ES6 declare default parameters? How is it different from ES5?**
- *考察点:函数参数默认值。*
#8 初级 ES6

什么是扩展运算符(...)?常见应用场景有哪些?

What is the spread operator (...)? What are its common use cases?

**What is the spread operator (...)? What are its common use cases?**
- *考察点:数组、对象、函数参数等。*
#9 初级 ES6

ES6 如何声明多行字符串?

How does ES6 declare multi-line strings?

**How does ES6 declare multi-line strings?**
- *考察点:模板字符串语法。*
#10 初级 ES6

for...of 和 for...in 有什么区别?

What are the differences between for...of and for...in?

**What are the differences between for...of and for...in?**
- *考察点:遍历对象与数组的方式。*
#11 初级 ES6

什么是 Map 和 Set?与 Object、Array 有何区别?

What are Map and Set? How do they differ from Object and Array?

**What are Map and Set? How do they differ from Object and Array?**
- *考察点:新数据结构的理解。*
#12 初级 ES6

ES6 如何简化对象属性和方法的声明?

How does ES6 simplify object property and method declarations?

**How does ES6 simplify object property and method declarations?**
- *考察点:对象字面量增强写法。*
#13 初级 ES6

什么是 Symbol?有哪些应用场景?

What is Symbol? What are its application scenarios?

**What is Symbol? What are its application scenarios?**
- *考察点:唯一性、隐藏属性等。*
#14 初级 ES6

ES6 如何实现类(Class)?与 ES5 构造函数有何不同?

How does ES6 implement classes? How is it different from ES5 constructor functions?

**How does ES6 implement classes? How is it different from ES5 constructor functions?**
- *考察点:面向对象语法。*
#15 初级 ES6

什么是模块化?ES6 如何导入和导出模块?

What is modularization? How does ES6 import and export modules?

**What is modularization? How does ES6 import and export modules?**
- *考察点:import/export 语法。*
#16 初级 ES6

什么是 Promise?它有哪三种状态?

What is a Promise? What are its three states?

**What is a Promise? What are its three states?**
- *考察点:异步编程基础概念。*
#17 初级 ES6

ES6 为 Array 新增了哪些常用方法?

What new common methods did ES6 add to Array?

**What new common methods did ES6 add to Array?**
- *考察点:数组操作API。*
#18 初级 ES6

ES6 为 String 新增了哪些常用方法?

What new common methods did ES6 add to String?

**What new common methods did ES6 add to String?**
- *考察点:字符串处理API。*
#19 初级 ES6

const 声明的变量真的不可变吗?请举例说明。

**Are variables declared with const really immutable? Please give examples.**
- *考察点:const 的特性和限制。*
#1 中级 ES6

请解释箭头函数的 this 指向规则。

**Please explain the 'this' binding rules of arrow functions.**
- *考察点:词法作用域与上下文绑定。*
#2 中级 ES6

什么是 Promise?它解决了什么问题?

What is Promise? What problems does it solve?

**What is Promise? What problems does it solve?**
- *考察点:异步编程与回调地狱。*
#3 中级 ES6

如何实现一个简单的 Promise?

How to implement a simple Promise?

**How to implement a simple Promise?**
- *考察点:状态机与异步控制。*
#4 中级 ES6

什么是生成器(Generator)?如何使用?

What is a Generator? How to use it?

**What is a Generator? How to use it?**
- *考察点:函数暂停与迭代器协议。*
#5 中级 ES6

ES6 的类继承是如何实现的?super 关键字有什么作用?

How is class inheritance implemented in ES6? What is the role of the super keyword?

**How is class inheritance implemented in ES6? What is the role of the super keyword?**
- *考察点:原型链与构造函数继承。*
#6 中级 ES6

什么是 Proxy?可以实现哪些功能?

What is Proxy? What functions can it implement?

**What is Proxy? What functions can it implement?**
- *考察点:对象代理与元编程。*
#7 中级 ES6

什么是迭代器(Iterator)?如何自定义一个迭代器?

What is an Iterator? How to customize an iterator?

**What is an Iterator? How to customize an iterator?**
- *考察点:遍历协议与 Symbol.iterator。*
#8 中级 ES6

Set 和 Map 的常用方法有哪些?如何遍历?

What are the common methods of Set and Map? How to iterate through them?

**What are the common methods of Set and Map? How to iterate through them?**
- *考察点:API 熟悉度。*
#9 中级 ES6

什么是 WeakMap 和 WeakSet?它们的应用场景是什么?

What are WeakMap and WeakSet? What are their application scenarios?

**What are WeakMap and WeakSet? What are their application scenarios?**
- *考察点:内存管理与垃圾回收。*
#10 中级 ES6

ES6 如何实现对象的浅拷贝和深拷贝?

How does ES6 implement shallow copy and deep copy of objects?

**How does ES6 implement shallow copy and deep copy of objects?**
- *考察点:扩展运算符、Object.assign、递归。*
#11 中级 ES6

什么是 async/await?它与 Promise 有什么关系?

What is async/await? What is its relationship with Promise?

**What is async/await? What is its relationship with Promise?**
- *考察点:异步语法糖与错误处理。*
#12 中级 ES6

什么是模块的动态导入?如何使用?

What is dynamic import of modules? How to use it?

**What is dynamic import of modules? How to use it?**
- *考察点:import() 语法与懒加载。*
#13 中级 ES6

ES6 如何实现函数参数的剩余参数和展开参数?

How does ES6 implement rest parameters and spread parameters in function parameters?

**How does ES6 implement rest parameters and spread parameters in function parameters?**
- *考察点:...rest 与 ...spread。*
#14 中级 ES6

什么是解构赋值中的默认值?有哪些注意事项?

What are default values in destructuring assignment? What should be noted?

**What are default values in destructuring assignment? What should be noted?**
- *考察点:语法细节与边界情况。*
#15 中级 ES6

ES6 为 Object 新增了哪些常用方法?请举例说明。

What common methods did ES6 add to Object? Please give examples.

**What common methods did ES6 add to Object? Please give examples.**
- *考察点:对象操作API的掌握。*
#16 中级 ES6

如何在函数参数中使用解构赋值?有哪些高级用法?

How to use destructuring assignment in function parameters? What are the advanced uses?

**How to use destructuring assignment in function parameters? What are the advanced uses?**
- *考察点:函数参数解构的灵活应用。*
#17 中级 ES6

什么是尾调用优化?ES6 如何支持尾调用优化?

What is tail call optimization? How does ES6 support tail call optimization?

**What is tail call optimization? How does ES6 support tail call optimization?**
- *考察点:性能优化与函数调用机制。*
#1 高级 ES6

请解释 ES6 的事件循环机制及微任务、宏任务的执行顺序。

**Please explain ES6's event loop mechanism and the execution order of microtasks and macrotasks.**
- *考察点:异步执行模型与优先级。*
#2 高级 ES6

如何实现一个完整的 Promise/A+ 规范的 Promise?

How to implement a complete Promise/A+ specification compliant Promise?

**How to implement a complete Promise/A+ specification compliant Promise?**
- *考察点:状态管理与链式调用。*
#3 高级 ES6

Generator 与 async/await 的底层原理是什么?

What are the underlying principles of Generator and async/await?

**What are the underlying principles of Generator and async/await?**
- *考察点:协程、自动化流程控制。*
#4 高级 ES6

Proxy 可以实现哪些高级场景?请举例说明。

What advanced scenarios can Proxy implement? Please give examples.

**What advanced scenarios can Proxy implement? Please give examples.**
- *考察点:数据劫持、响应式、AOP。*
#5 高级 ES6

Symbol 的高级应用:如何用于实现单例模式和自定义迭代器?

**Advanced applications of Symbol: How to use it to implement singleton pattern and custom iterators?**
- *考察点:Symbol的唯一性、隐藏属性、以及在设计模式中的应用。*
#6 高级 ES6

如何实现一个简单的响应式系统(如 Vue3 响应式原理)?

How to implement a simple reactive system (like Vue3 reactivity principle)?

**How to implement a simple reactive system (like Vue3 reactivity principle)?**
- *考察点:Proxy、依赖收集、数据劫持。*
#7 高级 ES6

ES6 的模块化与 CommonJS 有哪些区别?如何兼容?

What are the differences between ES6 modules and CommonJS? How to make them compatible?

**What are the differences between ES6 modules and CommonJS? How to make them compatible?**
- *考察点:静态/动态加载、导入导出机制。*
#8 高级 ES6

如何实现一个异步迭代器?应用场景有哪些?

How to implement an async iterator? What are the application scenarios?

**How to implement an async iterator? What are the application scenarios?**
- *考察点:Symbol.asyncIterator、for await...of。*
#9 高级 ES6

Reflect API 有哪些常用方法?与 Proxy 有何关系?

What are the common methods of Reflect API? What is its relationship with Proxy?

**What are the common methods of Reflect API? What is its relationship with Proxy?**
- *考察点:元编程与对象操作。*
#10 高级 ES6

ES6 如何优化性能?有哪些新特性有助于性能提升?

How does ES6 optimize performance? What new features help improve performance?

**How does ES6 optimize performance? What new features help improve performance?**
- *考察点:尾调用优化、懒加载、数据结构选择。*
#11 高级 ES6

如何实现一个简单的模板引擎(支持插值表达式)?

How to implement a simple template engine (supporting interpolation expressions)?

**How to implement a simple template engine (supporting interpolation expressions)?**
- *考察点:字符串处理与正则表达式。*
#12 高级 ES6

ES6 如何处理循环引用?有哪些解决方案?

How does ES6 handle circular references? What are the solutions?

**How does ES6 handle circular references? What are the solutions?**
- *考察点:WeakMap、序列化算法。*
#13 高级 ES6

如何实现一个类的 mixin?有哪些注意事项?

How to implement class mixins? What should be noted?

**How to implement class mixins? What should be noted?**
- *考察点:对象合成与继承。*
#14 高级 ES6

ES6 如何实现私有方法和私有属性?有哪些限制?

How does ES6 implement private methods and properties? What are the limitations?

**How does ES6 implement private methods and properties? What are the limitations?**
- *考察点:#语法、闭包、Symbol、WeakMap等多种实现方式。*
#15 高级 ES6

如何实现一个异步队列?应用场景有哪些?

How to implement an async queue? What are the application scenarios?

**How to implement an async queue? What are the application scenarios?**
- *考察点:Promise、Generator、事件循环。*
#16 高级 ES6

如何用 Proxy 实现数据校验和自动格式化?

How to use Proxy to implement data validation and automatic formatting?

**How to use Proxy to implement data validation and automatic formatting?**
- *考察点:拦截器与数据处理。*

---
#1 初级 TYPESCRIPT

TypeScript 和 JavaScript 的区别是什么?

What are the differences between TypeScript and JavaScript?

**What are the differences between TypeScript and JavaScript?**
- *考察点:对 TypeScript 基本概念和语言特性的理解。*
#2 初级 TYPESCRIPT

TypeScript 的基本数据类型有哪些?

What are the basic data types in TypeScript?

**What are the basic data types in TypeScript?**
- *考察点:对 TypeScript 类型系统基础的掌握程度。*
#3 初级 TYPESCRIPT

什么是类型注解?如何使用?

What are type annotations? How to use them?

**What are type annotations? How to use them?**
- *考察点:类型声明语法与实际应用。*
#4 初级 TYPESCRIPT

什么是类型推断?

What is type inference?

**What is type inference?**
- *考察点:类型推断机制理解。*
#5 初级 TYPESCRIPT

什么是接口(interface)?如何定义和使用?

What is an interface? How to define and use it?

**What is an interface? How to define and use it?**
- *考察点:接口概念与面向对象抽象能力。*
#6 初级 TYPESCRIPT

TypeScript 中的可选链操作符(?.)和空值合并操作符(??)如何使用?

How to use optional chaining operator (?.) and nullish coalescing operator (??) in TypeScript?

**How to use optional chaining operator (?.) and nullish coalescing operator (??) in TypeScript?**
- *考察点:安全访问语法与实际应用。*
#7 初级 TYPESCRIPT

TypeScript 中的枚举(enum)是什么?

What is enum in TypeScript?

**What is enum in TypeScript?**
- *考察点:枚举类型理解与使用场景。*
#8 初级 TYPESCRIPT

TypeScript 如何定义数组和元组?

How does TypeScript define arrays and tuples?

**How does TypeScript define arrays and tuples?**
- *考察点:数组与元组类型区别和应用。*
#9 初级 TYPESCRIPT

什么是联合类型(Union Types)和交叉类型(Intersection Types)?

What are Union Types and Intersection Types?

**What are Union Types and Intersection Types?**
- *考察点:复合类型理解与实际应用。*
#10 初级 TYPESCRIPT

TypeScript 中的类型别名(type alias)是什么?

What is type alias in TypeScript?

**What is type alias in TypeScript?**
- *考察点:类型别名概念与应用场景。*
#11 初级 TYPESCRIPT

如何在 TypeScript 中定义函数类型?

How to define function types in TypeScript?

**How to define function types in TypeScript?**
- *考察点:函数类型声明方式与应用。*
#12 初级 TYPESCRIPT

TypeScript 如何处理 JavaScript 文件?allowJs 配置的作用是什么?

How does TypeScript handle JavaScript files? What is the role of allowJs configuration?

**How does TypeScript handle JavaScript files? What is the role of allowJs configuration?**
- *考察点:TS 与 JS 混合开发理解。*
#1 中级 TYPESCRIPT

什么是类型断言(Type Assertion)?和类型转换的区别?

What is Type Assertion? What's the difference from type conversion?

**What is Type Assertion? What's the difference from type conversion?**
- *考察点:类型断言概念与区别。*
#2 中级 TYPESCRIPT

TypeScript 中的可选属性和只读属性怎么用?

How to use optional properties and readonly properties in TypeScript?

**How to use optional properties and readonly properties in TypeScript?**
- *考察点:对象属性修饰符理解与应用。*
#3 中级 TYPESCRIPT

什么是泛型(Generics)?如何使用泛型函数和泛型接口?

What are Generics? How to use generic functions and generic interfaces?

**What are Generics? How to use generic functions and generic interfaces?**
- *考察点:泛型编程思想与实际应用。*
#4 中级 TYPESCRIPT

什么是泛型约束(Generic Constraints)?如何使用 extends 关键字?

What are Generic Constraints? How to use the extends keyword?

**What are Generic Constraints? How to use the extends keyword?**
- *考察点:泛型约束机制与复杂场景处理。*
#5 中级 TYPESCRIPT

TypeScript 如何实现类的继承和接口的实现?

How does TypeScript implement class inheritance and interface implementation?

**How does TypeScript implement class inheritance and interface implementation?**
- *考察点:面向对象继承与接口实现机制。*
#6 中级 TYPESCRIPT

什么是命名空间(namespace)和模块(module)?

What are namespaces and modules?

**What are namespaces and modules?**
- *考察点:代码组织方式与最佳实践。*
#7 中级 TYPESCRIPT

TypeScript 的装饰器(Decorator)是什么?常见的装饰器类型有哪些?

What are decorators in TypeScript? What are the common types of decorators?

**What are decorators in TypeScript? What are the common types of decorators?**
- *考察点:装饰器模式与元编程能力。*
#8 中级 TYPESCRIPT

什么是类型守卫(Type Guard)?有哪些实现方式?

What are Type Guards? What are the implementation methods?

**What are Type Guards? What are the implementation methods?**
- *考察点:类型缩窄机制与运行时类型检查。*
#9 中级 TYPESCRIPT

TypeScript 如何与第三方 JavaScript 库集成?

How does TypeScript integrate with third-party JavaScript libraries?

**How does TypeScript integrate with third-party JavaScript libraries?**
- *考察点:类型声明文件与生态集成。*
#10 中级 TYPESCRIPT

什么是声明文件(.d.ts)?如何编写?

What are declaration files (.d.ts)? How to write them?

**What are declaration files (.d.ts)? How to write them?**
- *考察点:类型声明文件理解与编写能力。*
#11 中级 TYPESCRIPT

TypeScript 的编译选项(tsconfig.json)常用配置有哪些?

What are the common configurations in TypeScript compilation options (tsconfig.json)?

**What are the common configurations in TypeScript compilation options (tsconfig.json)?**
- *考察点:编译配置理解与项目搭建能力。*
#12 中级 TYPESCRIPT

TypeScript 的模块解析策略有哪些?如何配置路径映射?

What are TypeScript's module resolution strategies? How to configure path mapping?

**What are TypeScript's module resolution strategies? How to configure path mapping?**
- *考察点:模块系统与路径映射配置。*
#1 高级 TYPESCRIPT

什么是条件类型(Conditional Types)?举例说明

What are Conditional Types? Please give examples.

**What are Conditional Types? Please give examples.**
- *考察点:高级类型系统与类型编程能力。*
#2 高级 TYPESCRIPT

什么是映射类型(Mapped Types)?常见的内置映射类型有哪些?

What are Mapped Types? What are the common built-in mapped types?

**What are Mapped Types? What are the common built-in mapped types?**
- *考察点:映射类型理解与工具类型应用。*
#3 高级 TYPESCRIPT

什么是索引类型查询(keyof)和索引访问类型(T[K])?

What are index type queries (keyof) and indexed access types (T[K])?

**What are index type queries (keyof) and indexed access types (T[K])?**
- *考察点:类型索引操作与类型安全访问。*
#4 高级 TYPESCRIPT

infer 关键字的作用及使用场景?

What is the role of the infer keyword and its usage scenarios?

**What is the role of the infer keyword and its usage scenarios?**
- *考察点:类型推断与条件类型提取。*
#5 高级 TYPESCRIPT

如何实现类型体操(Type Challenges)?举例说明

How to implement Type Challenges? Please give examples.

**How to implement Type Challenges? Please give examples.**
- *考察点:类型系统深度掌握与类型编程技巧。*
#6 高级 TYPESCRIPT

TypeScript 的类型兼容性是如何判断的?

How is type compatibility determined in TypeScript?

**How is type compatibility determined in TypeScript?**
- *考察点:结构类型系统与兼容性规则。*
#7 高级 TYPESCRIPT

什么是 never 类型?有哪些应用场景?

What is the never type? What are its application scenarios?

**What is the never type? What are its application scenarios?**
- *考察点:底层类型理解与边界处理。*
#8 高级 TYPESCRIPT

TypeScript 如何实现类型安全的链式调用?

How does TypeScript implement type-safe method chaining?

**How does TypeScript implement type-safe method chaining?**
- *考察点:高级设计模式与类型安全 API 设计。*
#9 高级 TYPESCRIPT

如何实现一个深度只读(DeepReadonly)类型?

How to implement a DeepReadonly type?

**How to implement a DeepReadonly type?**
- *考察点:递归类型与映射类型综合应用。*
#10 高级 TYPESCRIPT

TypeScript 4.x 新增了哪些重要特性?

What important features were added in TypeScript 4.x?

**What important features were added in TypeScript 4.x?**
- *考察点:最新特性与技术发展趋势。*
#11 高级 TYPESCRIPT

什么是协变(Covariance)和逆变(Contravariance)?在 TypeScript 中如何体现?

What are Covariance and Contravariance? How are they reflected in TypeScript?

**What are Covariance and Contravariance? How are they reflected in TypeScript?**
- *考察点:型变概念与实际体现。*
#12 高级 TYPESCRIPT

如何在 TypeScript 中实现单例模式并确保类型安全?

How to implement the Singleton pattern in TypeScript while ensuring type safety?

**How to implement the Singleton pattern in TypeScript while ensuring type safety?**
- *考察点:设计模式实现与类型技巧综合应用。*