DrillLab
练习Practice

动手做Get your hands on it

练习跟着课文走 —— 每节课尾都有本课的练习。这一页是全部练习的总库,想集中刷题的时候来。 每个练习都写清了它来自哪一节,卡住了就回去看那一节。Practice follows the lessons — every lesson ends with the exercises for that lesson. This page is the whole library, for when you want to drill in one sitting. Each exercise names the lesson it came from, so you can go back when you stall.

0 / 148个做对过you got right
筛一下Filter these面试八股Interview questionsL1L1认出来Spot it
难度LevelL1 → L4 和上面四档同一个意思:给你的东西越来越少L1 → L4: the same idea as the four tiers above — less is handed to you全部难度All levelsL1L1L2L2L3L3L4L4

已筛到你正在学的《面试八股》。想看全部就点上面的「全部」。Filtered to Interview questions — the course you are on. Use “All” above to see everything.

练习Exercises

筛出 3 个练习(共 148 个)。Showing 3 of 148.
来自From 16 道题逐题对照The 16 problems, compared one by one · 面试八股Interview questions
L1认出来Spot it认出考点:这道题在考什么Name the point: what is this question testingDrillLab 自出Written by DrillLab

面试官出题:「实现一个 Kanban 看板,卡片可以在三列之间移动。」 这道题最核心的考点是哪一个?

The interviewer says: “Build a Kanban board where a card can move between three columns.” Which is the central point this question tests?

先选一个选项Pick an option first
来自From Utility Types:会用,还要会手写Utility types: use them, and write them yourself · 面试八股Interview questions
L1认出来Spot it认出这个 mapped type 在干什么Work out what this mapped type doesDrillLab 自出Written by DrillLab

面试官给出下面这个类型,问它对 T 做了什么。

An interviewer shows you the type below and asks what it does to T.

TypeScriptMystery.ts示意Illustrative
1type Mystery<T> = {
2 [K in keyof T]-?: T[K];
3};
先选一个选项Pick an option first
来自From 泛型与收窄:把 any 赶出代码Generics and narrowing: getting any out of the code · 面试八股Interview questions
L1认出来Spot itunknown 参数该怎么用起来How to actually use an unknown parameterDrillLab 自出Written by DrillLab

这个函数编译不过:'e' is of type 'unknown'.下面哪种改法是对的?

This function does not compile: 'e' is of type 'unknown'. Which fix is the right one?

TypeScriptreport.ts示意Illustrative
1function report(e: unknown) {
2 console.log(e.message);
3 // ^ ✗ 'e' is of type 'unknown'.
4}
先选一个选项Pick an option first