Skip to content

新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構 - #27

Merged
Retsomm merged 2 commits into
mainfrom
dev
Jul 28, 2026
Merged

新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構#27
Retsomm merged 2 commits into
mainfrom
dev

Conversation

@Retsomm

@RetsommRetsomm commented Jul 28, 2026

Copy link
Copy Markdown
Owner
  • ydkjs-sc(作用域和閉包)、ydkjs-tp(this和物件原型)、ydkjs-tg(類型和語法)、 ydkjs-ap(異步和性能)、ydkjs-ug(起步上路)、ydkjs-es6(ES6及更新版本) 六章題目全部完成,每題程式碼片段皆以 node 實測後才寫入,並通過 validate-questions.mjs/tsc/next build 驗證
  • 新增 packages/core 的 Topic 抽象(types.ts + data/topics.ts), 首頁單一書籍卡片點入後先看到章節列表,再進入關卡列表(web + mobile 同步)

Summary by CodeRabbit

  • New Features
    • Added topic-based learning navigation on web and mobile.
    • Grouped related chapters into topics, with topic icons and progress summaries.
    • Added topic detail screens listing chapters and completion progress.
    • Improved back navigation between topics, chapters, and levels.
    • Added extensive JavaScript practice content covering scope, types, async programming, ES6+, objects, prototypes, classes, and performance.

- ydkjs-sc(作用域和閉包)、ydkjs-tp(this和物件原型)、ydkjs-tg(類型和語法)、
ydkjs-ap(異步和性能)、ydkjs-ug(起步上路)、ydkjs-es6(ES6及更新版本)
六章題目全部完成,每題程式碼片段皆以 node 實測後才寫入,並通過
validate-questions.mjs/tsc/next build 驗證
- 新增 packages/core 的 Topic 抽象(types.ts + data/topics.ts),
首頁單一書籍卡片點入後先看到章節列表,再進入關卡列表(web + mobile 同步)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
easy-learnReadyReadyPreview, CommentJul 28, 2026 8:37am

@coderabbitai

coderabbitaiBot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in:18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 299a5851-63c2-47ee-9add-eb290f966719

📥 Commits

Reviewing files that changed from the base of the PR and between 947474c and 530790a.

📒 Files selected for processing (12)
  • packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json
  • packages/core/src/data/questions/ydkjs-ap-2-callbacks.json
  • packages/core/src/data/questions/ydkjs-ap-5-program-performance.json
  • packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json
  • packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json
  • packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json
  • packages/core/src/data/questions/ydkjs-es6-5-collections.json
  • packages/core/src/data/questions/ydkjs-es6-6-new-apis.json
  • packages/core/src/data/questions/ydkjs-sc-5-closures.json
  • packages/core/src/data/questions/ydkjs-tg-1-types.json
  • packages/core/src/data/questions/ydkjs-tg-3-native-functions.json
  • packages/core/src/data/questions/ydkjs-ug-3-series-overview.json
📝 Walkthrough

Walkthrough

Adds grouped topic data and topic chapter navigation to the web and mobile apps. The core package gains six YDKJS chapters and numerous structured question datasets covering scope, types, objects, asynchronous JavaScript, ES6, and introductory programming concepts.

Changes

Topic learning flow

Layer / File(s)Summary
Topic catalog and navigation
packages/core/src/data/topics.ts, packages/core/src/types.ts, apps/web/src/..., apps/mobile/...
Topics aggregate chapters, Home cards route grouped topics to TopicBooks, and chapter back-navigation preserves topic context.
Topic chapter screens
apps/web/screens/TopicBooks.tsx, apps/mobile/screens/TopicBooks.tsx
New screens display topic metadata, chapter cards, completion counts, percentages, and progress bars.
YDKJS content integration
packages/core/src/data/chapters.ts, packages/core/src/data/questions/*
Six YDKJS chapters and structured question sets with answers, explanations, code samples, and verification data are added.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
participant Home
participant TopicBooks
participant LevelList
participant Progress
Home->>TopicBooks: open grouped topic
TopicBooks->>Progress: read completed levels
TopicBooks->>LevelList: open selected chapter
LevelList->>TopicBooks: return for grouped chapter
Loading

Possibly related PRs

  • Retsomm/EasyLearn#11: Introduces the mobile Home navigation structure extended by this topic-based routing.
  • Retsomm/EasyLearn#14: Modifies the Home topic/chapter card rendering that this change further integrates with topic navigation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedTitle accurately summarizes the main changes: adding YDKJS practice questions and changing the home navigation to a book→chapter two-level structure.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json`:
- Around line 120-137: 修正題目 ydkjs-ap-1-q6 的選項 a 與
explanation,將「非阻塞」限定為瀏覽器/Node.js 提供的特定非同步 API(如計時器、網路請求),並明確保留同步程式碼、CPU 密集型
JavaScript 與同步 Node I/O 會占用事件迴圈;不要將非阻塞描述成 JavaScript 本身的普遍特性。
In `@packages/core/src/data/questions/ydkjs-ap-2-callbacks.json`:
- Line 36: Update the cache-hit condition in the getData examples to check cache
membership with hasOwnProperty rather than cached-value truthiness, preserving
cached 0, false, and empty-string values. Apply this at
packages/core/src/data/questions/ydkjs-ap-2-callbacks.json lines 36-36, 59-59,
and 82-82.
In `@packages/core/src/data/questions/ydkjs-ap-5-program-performance.json`:
- Around line 9-21: Revise the Web Worker explanations in
packages/core/src/data/questions/ydkjs-ap-5-program-performance.json at lines
9-21, 28-40, 47-59, and 116-128: retain that ordinary variables are isolated,
but clarify that SharedArrayBuffer with Atomics enables intentional shared
memory; describe postMessage/message as the normal, not exclusive, communication
mechanism; and distinguish structured cloning from transferable ownership for
ArrayBuffer, MessagePort, and ImageBitmap. Update the corresponding options,
answers, and explanations consistently.
In `@packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json`:
- Around line 120-132: Update the question’s option a and its explanation so
they no longer claim observables share a generator-based foundation: state that
iterable sequences and generator coroutines use generator mechanisms, while
observables use a separate closure/listener-based multi-value event pattern.
Preserve the distinction that all three address limitations of Promise, but
avoid describing them as one shared implementation or foundation.
In `@packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json`:
- Around line 93-110: 更新題目與解釋中對 TC39 階段的描述:明確指出 Stage 0 才是最早期階段,並將 Stage 4
描述為提案已定案、將納入正式規範,不要限定為「下一版」規範。同步檢查 prompt、選項 a、explanation 與
verify.manual,保留其餘關於早期提案風險的內容。
In `@packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json`:
- Around line 74-95: Update the run function’s step error handling to use an
explicit resume mode rather than the truthiness of err, so rejected Promises
with 0, false, empty string, null, or undefined invoke it.throw and reach the
generator’s catch block. Preserve it.next for successful resolutions and pass
the mode through both Promise callbacks.
- Around line 120-137: Update the explanation in question “ydkjs-es6-4-q6” to
describe async/await as a conceptual analogue to the generator-plus-driver
pattern, not literal generator syntax sugar. Clarify that async functions return
Promises and use native await suspension, whereas generators expose
next()/throw() and iterator objects; retain the comparison of their similar
control flow without claiming they are the same mechanism.
In `@packages/core/src/data/questions/ydkjs-es6-5-collections.json`:
- Around line 120-140: Update the WeakMap question’s topic and explanation to
state that keys may be objects or non-registered Symbols, while primitive
strings and numbers remain invalid. Preserve the existing string-key example,
answer, and verification output, and adjust only the descriptions that
incorrectly claim keys must always be objects.
In `@packages/core/src/data/questions/ydkjs-es6-6-new-apis.json`:
- Around line 120-140: Update the explanation for question “ydkjs-es6-6-q6” to
define Number.EPSILON as the gap between 1 and the next representable Number,
not a universal floating-point tolerance. Preserve the current example’s
false/true result, but state that larger magnitudes require a magnitude-aware or
domain-specific tolerance, using values such as 1000.1 + 1000.2 versus 2000.3 as
the boundary example.
In `@packages/core/src/data/questions/ydkjs-sc-5-closures.json`:
- Line 90: Update the explanation in the relevant YDKJS question entry to
replace the stale “jsa-2-q8” cross-reference with the correct dataset question
ID for the let-based solution, or remove the cross-reference if no matching
target exists. Preserve the rest of the explanation unchanged.
In `@packages/core/src/data/questions/ydkjs-tg-1-types.json`:
- Around line 127-136: Update the explanation for answer option “a” and the
corresponding “explanation” field to scope typeof’s no-throw safety specifically
to unresolvable or undeclared identifiers. Remove the claim that it is safe for
any input, and do not imply that let/const bindings in their temporal dead zone
are handled safely; preserve the existing null caveat and overall rationale.
In `@packages/core/src/data/questions/ydkjs-tg-3-native-functions.json`:
- Line 9: Update the topic text in the native-functions entry to avoid claiming
that Object.prototype.toString.call precisely determines types or reads an
internal [[Class]] marker. Reword it to describe the result as built-in tags, or
the tags returned for these values, while preserving the existing explanation’s
scope.
In `@packages/core/src/data/questions/ydkjs-ug-3-series-overview.json`:
- Line 13: Update the arrow-function example and its expected answer to describe
lexical this as the surrounding CommonJS module context (module.exports), not
the global object. Keep the regular method’s this behavior unchanged and ensure
the explanation reflects that this.name resolves to undefined from that binding.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5a4f6ed1-ae65-4dd9-a37b-2cd050668de5

📥 Commits

Reviewing files that changed from the base of the PR and between 79532aa and 947474c.

📒 Files selected for processing (47)
  • apps/mobile/app/(tabs)/index.tsx
  • apps/mobile/screens/Home.tsx
  • apps/mobile/screens/TopicBooks.tsx
  • apps/web/src/App.tsx
  • apps/web/src/screens/Home.tsx
  • apps/web/src/screens/TopicBooks.tsx
  • packages/core/src/data/chapters.ts
  • packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json
  • packages/core/src/data/questions/ydkjs-ap-2-callbacks.json
  • packages/core/src/data/questions/ydkjs-ap-3-promises.json
  • packages/core/src/data/questions/ydkjs-ap-4-generators.json
  • packages/core/src/data/questions/ydkjs-ap-5-program-performance.json
  • packages/core/src/data/questions/ydkjs-ap-6-benchmarking-tuning.json
  • packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json
  • packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json
  • packages/core/src/data/questions/ydkjs-es6-2-syntax.json
  • packages/core/src/data/questions/ydkjs-es6-3-code-organization.json
  • packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json
  • packages/core/src/data/questions/ydkjs-es6-5-collections.json
  • packages/core/src/data/questions/ydkjs-es6-6-new-apis.json
  • packages/core/src/data/questions/ydkjs-es6-7-metaprogramming.json
  • packages/core/src/data/questions/ydkjs-es6-8-beyond-es6.json
  • packages/core/src/data/questions/ydkjs-sc-1-what-is-scope.json
  • packages/core/src/data/questions/ydkjs-sc-2-lexical-scope.json
  • packages/core/src/data/questions/ydkjs-sc-3-function-block-scope.json
  • packages/core/src/data/questions/ydkjs-sc-4-hoisting.json
  • packages/core/src/data/questions/ydkjs-sc-5-closures.json
  • packages/core/src/data/questions/ydkjs-sc-6-dynamic-scope.json
  • packages/core/src/data/questions/ydkjs-sc-7-block-scope-alternatives.json
  • packages/core/src/data/questions/ydkjs-tg-1-types.json
  • packages/core/src/data/questions/ydkjs-tg-2-values.json
  • packages/core/src/data/questions/ydkjs-tg-3-native-functions.json
  • packages/core/src/data/questions/ydkjs-tg-4-coercion.json
  • packages/core/src/data/questions/ydkjs-tg-5-syntax.json
  • packages/core/src/data/questions/ydkjs-tp-1-about-this.json
  • packages/core/src/data/questions/ydkjs-tp-2-this-all-explained.json
  • packages/core/src/data/questions/ydkjs-tp-3-objects.json
  • packages/core/src/data/questions/ydkjs-tp-4-mixing-objects-classes.json
  • packages/core/src/data/questions/ydkjs-tp-5-prototypes.json
  • packages/core/src/data/questions/ydkjs-tp-6-behavior-delegation.json
  • packages/core/src/data/questions/ydkjs-tp-7-es6-class.json
  • packages/core/src/data/questions/ydkjs-ug-1-into-programming.json
  • packages/core/src/data/questions/ydkjs-ug-2-into-javascript.json
  • packages/core/src/data/questions/ydkjs-ug-3-series-overview.json
  • packages/core/src/data/topics.ts
  • packages/core/src/index.ts
  • packages/core/src/types.ts

Comment threadpackages/core/src/data/questions/ydkjs-ap-2-callbacks.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-ap-5-program-performance.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-ap-7-advanced-async.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-es6-6-new-apis.json
Comment threadpackages/core/src/data/questions/ydkjs-sc-5-closures.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-tg-1-types.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-tg-3-native-functions.json Outdated
- 非阻塞限定為特定瀏覽器/Node API,同步/CPU密集程式碼仍會阻塞
- 快取查詢改用 hasOwnProperty,避免誤判假值(0/false/'')為未命中
- Web Worker:補充 SharedArrayBuffer+Atomics 例外、postMessage 標準管道措辭、structured clone 與 transferable object 的差異
- 修正 observable 誤植為建立在生成器機制上的說法
- 修正 TC39 Stage 1 誤標為最早期階段(應為 Stage 0)
- 修正生成器驅動函式用 err 真假值判斷、無法處理假值錯誤原因的 bug
- 軟化 async/await 為生成器語法糖的說法,改為概念類比
- WeakMap key 補充 ES2023 非註冊 Symbol 的例外
- Number.EPSILON 補充僅適用於接近 1 量級數值的限制
- 修正跨檔案題目引用的錯誤標號(Q4→Q8)
- typeof 安全性限定於未宣告識別字,TDZ 內的 let/const 仍會拋錯
- 軟化 Object.prototype.toString.call 讀取「內部 [[Class]] 標記」的說法
- 修正箭頭函式 this 在 Node CommonJS 模組下實為 module.exports,非全域物件
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Retsomm
Retsomm merged commit dc3f7af into mainJul 28, 2026
2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Retsomm
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構 by Retsomm · Pull Request #27 · Retsomm/EasyLearn · GitHub
Skip to content

新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構 - #27

Merged
Retsomm merged 2 commits into
mainfrom
dev
Jul 28, 2026
Merged

新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構#27
Retsomm merged 2 commits into
mainfrom
dev

Conversation

@Retsomm

@RetsommRetsomm commented Jul 28, 2026

Copy link
Copy Markdown
Owner
  • ydkjs-sc(作用域和閉包)、ydkjs-tp(this和物件原型)、ydkjs-tg(類型和語法)、 ydkjs-ap(異步和性能)、ydkjs-ug(起步上路)、ydkjs-es6(ES6及更新版本) 六章題目全部完成,每題程式碼片段皆以 node 實測後才寫入,並通過 validate-questions.mjs/tsc/next build 驗證
  • 新增 packages/core 的 Topic 抽象(types.ts + data/topics.ts), 首頁單一書籍卡片點入後先看到章節列表,再進入關卡列表(web + mobile 同步)

Summary by CodeRabbit

  • New Features
    • Added topic-based learning navigation on web and mobile.
    • Grouped related chapters into topics, with topic icons and progress summaries.
    • Added topic detail screens listing chapters and completion progress.
    • Improved back navigation between topics, chapters, and levels.
    • Added extensive JavaScript practice content covering scope, types, async programming, ES6+, objects, prototypes, classes, and performance.

- ydkjs-sc(作用域和閉包)、ydkjs-tp(this和物件原型)、ydkjs-tg(類型和語法)、
ydkjs-ap(異步和性能)、ydkjs-ug(起步上路)、ydkjs-es6(ES6及更新版本)
六章題目全部完成,每題程式碼片段皆以 node 實測後才寫入,並通過
validate-questions.mjs/tsc/next build 驗證
- 新增 packages/core 的 Topic 抽象(types.ts + data/topics.ts),
首頁單一書籍卡片點入後先看到章節列表,再進入關卡列表(web + mobile 同步)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
easy-learnReadyReadyPreview, CommentJul 28, 2026 8:37am

@coderabbitai

coderabbitaiBot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in:18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 299a5851-63c2-47ee-9add-eb290f966719

📥 Commits

Reviewing files that changed from the base of the PR and between 947474c and 530790a.

📒 Files selected for processing (12)
  • packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json
  • packages/core/src/data/questions/ydkjs-ap-2-callbacks.json
  • packages/core/src/data/questions/ydkjs-ap-5-program-performance.json
  • packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json
  • packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json
  • packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json
  • packages/core/src/data/questions/ydkjs-es6-5-collections.json
  • packages/core/src/data/questions/ydkjs-es6-6-new-apis.json
  • packages/core/src/data/questions/ydkjs-sc-5-closures.json
  • packages/core/src/data/questions/ydkjs-tg-1-types.json
  • packages/core/src/data/questions/ydkjs-tg-3-native-functions.json
  • packages/core/src/data/questions/ydkjs-ug-3-series-overview.json
📝 Walkthrough

Walkthrough

Adds grouped topic data and topic chapter navigation to the web and mobile apps. The core package gains six YDKJS chapters and numerous structured question datasets covering scope, types, objects, asynchronous JavaScript, ES6, and introductory programming concepts.

Changes

Topic learning flow

Layer / File(s)Summary
Topic catalog and navigation
packages/core/src/data/topics.ts, packages/core/src/types.ts, apps/web/src/..., apps/mobile/...
Topics aggregate chapters, Home cards route grouped topics to TopicBooks, and chapter back-navigation preserves topic context.
Topic chapter screens
apps/web/screens/TopicBooks.tsx, apps/mobile/screens/TopicBooks.tsx
New screens display topic metadata, chapter cards, completion counts, percentages, and progress bars.
YDKJS content integration
packages/core/src/data/chapters.ts, packages/core/src/data/questions/*
Six YDKJS chapters and structured question sets with answers, explanations, code samples, and verification data are added.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
participant Home
participant TopicBooks
participant LevelList
participant Progress
Home->>TopicBooks: open grouped topic
TopicBooks->>Progress: read completed levels
TopicBooks->>LevelList: open selected chapter
LevelList->>TopicBooks: return for grouped chapter
Loading

Possibly related PRs

  • Retsomm/EasyLearn#11: Introduces the mobile Home navigation structure extended by this topic-based routing.
  • Retsomm/EasyLearn#14: Modifies the Home topic/chapter card rendering that this change further integrates with topic navigation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedTitle accurately summarizes the main changes: adding YDKJS practice questions and changing the home navigation to a book→chapter two-level structure.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json`:
- Around line 120-137: 修正題目 ydkjs-ap-1-q6 的選項 a 與
explanation,將「非阻塞」限定為瀏覽器/Node.js 提供的特定非同步 API(如計時器、網路請求),並明確保留同步程式碼、CPU 密集型
JavaScript 與同步 Node I/O 會占用事件迴圈;不要將非阻塞描述成 JavaScript 本身的普遍特性。
In `@packages/core/src/data/questions/ydkjs-ap-2-callbacks.json`:
- Line 36: Update the cache-hit condition in the getData examples to check cache
membership with hasOwnProperty rather than cached-value truthiness, preserving
cached 0, false, and empty-string values. Apply this at
packages/core/src/data/questions/ydkjs-ap-2-callbacks.json lines 36-36, 59-59,
and 82-82.
In `@packages/core/src/data/questions/ydkjs-ap-5-program-performance.json`:
- Around line 9-21: Revise the Web Worker explanations in
packages/core/src/data/questions/ydkjs-ap-5-program-performance.json at lines
9-21, 28-40, 47-59, and 116-128: retain that ordinary variables are isolated,
but clarify that SharedArrayBuffer with Atomics enables intentional shared
memory; describe postMessage/message as the normal, not exclusive, communication
mechanism; and distinguish structured cloning from transferable ownership for
ArrayBuffer, MessagePort, and ImageBitmap. Update the corresponding options,
answers, and explanations consistently.
In `@packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json`:
- Around line 120-132: Update the question’s option a and its explanation so
they no longer claim observables share a generator-based foundation: state that
iterable sequences and generator coroutines use generator mechanisms, while
observables use a separate closure/listener-based multi-value event pattern.
Preserve the distinction that all three address limitations of Promise, but
avoid describing them as one shared implementation or foundation.
In `@packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json`:
- Around line 93-110: 更新題目與解釋中對 TC39 階段的描述:明確指出 Stage 0 才是最早期階段,並將 Stage 4
描述為提案已定案、將納入正式規範,不要限定為「下一版」規範。同步檢查 prompt、選項 a、explanation 與
verify.manual,保留其餘關於早期提案風險的內容。
In `@packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json`:
- Around line 74-95: Update the run function’s step error handling to use an
explicit resume mode rather than the truthiness of err, so rejected Promises
with 0, false, empty string, null, or undefined invoke it.throw and reach the
generator’s catch block. Preserve it.next for successful resolutions and pass
the mode through both Promise callbacks.
- Around line 120-137: Update the explanation in question “ydkjs-es6-4-q6” to
describe async/await as a conceptual analogue to the generator-plus-driver
pattern, not literal generator syntax sugar. Clarify that async functions return
Promises and use native await suspension, whereas generators expose
next()/throw() and iterator objects; retain the comparison of their similar
control flow without claiming they are the same mechanism.
In `@packages/core/src/data/questions/ydkjs-es6-5-collections.json`:
- Around line 120-140: Update the WeakMap question’s topic and explanation to
state that keys may be objects or non-registered Symbols, while primitive
strings and numbers remain invalid. Preserve the existing string-key example,
answer, and verification output, and adjust only the descriptions that
incorrectly claim keys must always be objects.
In `@packages/core/src/data/questions/ydkjs-es6-6-new-apis.json`:
- Around line 120-140: Update the explanation for question “ydkjs-es6-6-q6” to
define Number.EPSILON as the gap between 1 and the next representable Number,
not a universal floating-point tolerance. Preserve the current example’s
false/true result, but state that larger magnitudes require a magnitude-aware or
domain-specific tolerance, using values such as 1000.1 + 1000.2 versus 2000.3 as
the boundary example.
In `@packages/core/src/data/questions/ydkjs-sc-5-closures.json`:
- Line 90: Update the explanation in the relevant YDKJS question entry to
replace the stale “jsa-2-q8” cross-reference with the correct dataset question
ID for the let-based solution, or remove the cross-reference if no matching
target exists. Preserve the rest of the explanation unchanged.
In `@packages/core/src/data/questions/ydkjs-tg-1-types.json`:
- Around line 127-136: Update the explanation for answer option “a” and the
corresponding “explanation” field to scope typeof’s no-throw safety specifically
to unresolvable or undeclared identifiers. Remove the claim that it is safe for
any input, and do not imply that let/const bindings in their temporal dead zone
are handled safely; preserve the existing null caveat and overall rationale.
In `@packages/core/src/data/questions/ydkjs-tg-3-native-functions.json`:
- Line 9: Update the topic text in the native-functions entry to avoid claiming
that Object.prototype.toString.call precisely determines types or reads an
internal [[Class]] marker. Reword it to describe the result as built-in tags, or
the tags returned for these values, while preserving the existing explanation’s
scope.
In `@packages/core/src/data/questions/ydkjs-ug-3-series-overview.json`:
- Line 13: Update the arrow-function example and its expected answer to describe
lexical this as the surrounding CommonJS module context (module.exports), not
the global object. Keep the regular method’s this behavior unchanged and ensure
the explanation reflects that this.name resolves to undefined from that binding.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5a4f6ed1-ae65-4dd9-a37b-2cd050668de5

📥 Commits

Reviewing files that changed from the base of the PR and between 79532aa and 947474c.

📒 Files selected for processing (47)
  • apps/mobile/app/(tabs)/index.tsx
  • apps/mobile/screens/Home.tsx
  • apps/mobile/screens/TopicBooks.tsx
  • apps/web/src/App.tsx
  • apps/web/src/screens/Home.tsx
  • apps/web/src/screens/TopicBooks.tsx
  • packages/core/src/data/chapters.ts
  • packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json
  • packages/core/src/data/questions/ydkjs-ap-2-callbacks.json
  • packages/core/src/data/questions/ydkjs-ap-3-promises.json
  • packages/core/src/data/questions/ydkjs-ap-4-generators.json
  • packages/core/src/data/questions/ydkjs-ap-5-program-performance.json
  • packages/core/src/data/questions/ydkjs-ap-6-benchmarking-tuning.json
  • packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json
  • packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json
  • packages/core/src/data/questions/ydkjs-es6-2-syntax.json
  • packages/core/src/data/questions/ydkjs-es6-3-code-organization.json
  • packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json
  • packages/core/src/data/questions/ydkjs-es6-5-collections.json
  • packages/core/src/data/questions/ydkjs-es6-6-new-apis.json
  • packages/core/src/data/questions/ydkjs-es6-7-metaprogramming.json
  • packages/core/src/data/questions/ydkjs-es6-8-beyond-es6.json
  • packages/core/src/data/questions/ydkjs-sc-1-what-is-scope.json
  • packages/core/src/data/questions/ydkjs-sc-2-lexical-scope.json
  • packages/core/src/data/questions/ydkjs-sc-3-function-block-scope.json
  • packages/core/src/data/questions/ydkjs-sc-4-hoisting.json
  • packages/core/src/data/questions/ydkjs-sc-5-closures.json
  • packages/core/src/data/questions/ydkjs-sc-6-dynamic-scope.json
  • packages/core/src/data/questions/ydkjs-sc-7-block-scope-alternatives.json
  • packages/core/src/data/questions/ydkjs-tg-1-types.json
  • packages/core/src/data/questions/ydkjs-tg-2-values.json
  • packages/core/src/data/questions/ydkjs-tg-3-native-functions.json
  • packages/core/src/data/questions/ydkjs-tg-4-coercion.json
  • packages/core/src/data/questions/ydkjs-tg-5-syntax.json
  • packages/core/src/data/questions/ydkjs-tp-1-about-this.json
  • packages/core/src/data/questions/ydkjs-tp-2-this-all-explained.json
  • packages/core/src/data/questions/ydkjs-tp-3-objects.json
  • packages/core/src/data/questions/ydkjs-tp-4-mixing-objects-classes.json
  • packages/core/src/data/questions/ydkjs-tp-5-prototypes.json
  • packages/core/src/data/questions/ydkjs-tp-6-behavior-delegation.json
  • packages/core/src/data/questions/ydkjs-tp-7-es6-class.json
  • packages/core/src/data/questions/ydkjs-ug-1-into-programming.json
  • packages/core/src/data/questions/ydkjs-ug-2-into-javascript.json
  • packages/core/src/data/questions/ydkjs-ug-3-series-overview.json
  • packages/core/src/data/topics.ts
  • packages/core/src/index.ts
  • packages/core/src/types.ts

Comment threadpackages/core/src/data/questions/ydkjs-ap-2-callbacks.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-ap-5-program-performance.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-ap-7-advanced-async.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-es6-6-new-apis.json
Comment threadpackages/core/src/data/questions/ydkjs-sc-5-closures.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-tg-1-types.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-tg-3-native-functions.json Outdated
- 非阻塞限定為特定瀏覽器/Node API,同步/CPU密集程式碼仍會阻塞
- 快取查詢改用 hasOwnProperty,避免誤判假值(0/false/'')為未命中
- Web Worker:補充 SharedArrayBuffer+Atomics 例外、postMessage 標準管道措辭、structured clone 與 transferable object 的差異
- 修正 observable 誤植為建立在生成器機制上的說法
- 修正 TC39 Stage 1 誤標為最早期階段(應為 Stage 0)
- 修正生成器驅動函式用 err 真假值判斷、無法處理假值錯誤原因的 bug
- 軟化 async/await 為生成器語法糖的說法,改為概念類比
- WeakMap key 補充 ES2023 非註冊 Symbol 的例外
- Number.EPSILON 補充僅適用於接近 1 量級數值的限制
- 修正跨檔案題目引用的錯誤標號(Q4→Q8)
- typeof 安全性限定於未宣告識別字,TDZ 內的 let/const 仍會拋錯
- 軟化 Object.prototype.toString.call 讀取「內部 [[Class]] 標記」的說法
- 修正箭頭函式 this 在 Node CommonJS 模組下實為 module.exports,非全域物件
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Retsomm
Retsomm merged commit dc3f7af into mainJul 28, 2026
2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Retsomm
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' 新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構 by Retsomm · Pull Request #27 · Retsomm/EasyLearn · GitHub
Skip to content

新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構 - #27

Merged
Retsomm merged 2 commits into
mainfrom
dev
Jul 28, 2026
Merged

新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構#27
Retsomm merged 2 commits into
mainfrom
dev

Conversation

@Retsomm

@RetsommRetsomm commented Jul 28, 2026

Copy link
Copy Markdown
Owner
  • ydkjs-sc(作用域和閉包)、ydkjs-tp(this和物件原型)、ydkjs-tg(類型和語法)、 ydkjs-ap(異步和性能)、ydkjs-ug(起步上路)、ydkjs-es6(ES6及更新版本) 六章題目全部完成,每題程式碼片段皆以 node 實測後才寫入,並通過 validate-questions.mjs/tsc/next build 驗證
  • 新增 packages/core 的 Topic 抽象(types.ts + data/topics.ts), 首頁單一書籍卡片點入後先看到章節列表,再進入關卡列表(web + mobile 同步)

Summary by CodeRabbit

  • New Features
    • Added topic-based learning navigation on web and mobile.
    • Grouped related chapters into topics, with topic icons and progress summaries.
    • Added topic detail screens listing chapters and completion progress.
    • Improved back navigation between topics, chapters, and levels.
    • Added extensive JavaScript practice content covering scope, types, async programming, ES6+, objects, prototypes, classes, and performance.

- ydkjs-sc(作用域和閉包)、ydkjs-tp(this和物件原型)、ydkjs-tg(類型和語法)、
ydkjs-ap(異步和性能)、ydkjs-ug(起步上路)、ydkjs-es6(ES6及更新版本)
六章題目全部完成,每題程式碼片段皆以 node 實測後才寫入,並通過
validate-questions.mjs/tsc/next build 驗證
- 新增 packages/core 的 Topic 抽象(types.ts + data/topics.ts),
首頁單一書籍卡片點入後先看到章節列表,再進入關卡列表(web + mobile 同步)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
easy-learnReadyReadyPreview, CommentJul 28, 2026 8:37am

@coderabbitai

coderabbitaiBot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in:18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 299a5851-63c2-47ee-9add-eb290f966719

📥 Commits

Reviewing files that changed from the base of the PR and between 947474c and 530790a.

📒 Files selected for processing (12)
  • packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json
  • packages/core/src/data/questions/ydkjs-ap-2-callbacks.json
  • packages/core/src/data/questions/ydkjs-ap-5-program-performance.json
  • packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json
  • packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json
  • packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json
  • packages/core/src/data/questions/ydkjs-es6-5-collections.json
  • packages/core/src/data/questions/ydkjs-es6-6-new-apis.json
  • packages/core/src/data/questions/ydkjs-sc-5-closures.json
  • packages/core/src/data/questions/ydkjs-tg-1-types.json
  • packages/core/src/data/questions/ydkjs-tg-3-native-functions.json
  • packages/core/src/data/questions/ydkjs-ug-3-series-overview.json
📝 Walkthrough

Walkthrough

Adds grouped topic data and topic chapter navigation to the web and mobile apps. The core package gains six YDKJS chapters and numerous structured question datasets covering scope, types, objects, asynchronous JavaScript, ES6, and introductory programming concepts.

Changes

Topic learning flow

Layer / File(s)Summary
Topic catalog and navigation
packages/core/src/data/topics.ts, packages/core/src/types.ts, apps/web/src/..., apps/mobile/...
Topics aggregate chapters, Home cards route grouped topics to TopicBooks, and chapter back-navigation preserves topic context.
Topic chapter screens
apps/web/screens/TopicBooks.tsx, apps/mobile/screens/TopicBooks.tsx
New screens display topic metadata, chapter cards, completion counts, percentages, and progress bars.
YDKJS content integration
packages/core/src/data/chapters.ts, packages/core/src/data/questions/*
Six YDKJS chapters and structured question sets with answers, explanations, code samples, and verification data are added.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
participant Home
participant TopicBooks
participant LevelList
participant Progress
Home->>TopicBooks: open grouped topic
TopicBooks->>Progress: read completed levels
TopicBooks->>LevelList: open selected chapter
LevelList->>TopicBooks: return for grouped chapter
Loading

Possibly related PRs

  • Retsomm/EasyLearn#11: Introduces the mobile Home navigation structure extended by this topic-based routing.
  • Retsomm/EasyLearn#14: Modifies the Home topic/chapter card rendering that this change further integrates with topic navigation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedTitle accurately summarizes the main changes: adding YDKJS practice questions and changing the home navigation to a book→chapter two-level structure.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json`:
- Around line 120-137: 修正題目 ydkjs-ap-1-q6 的選項 a 與
explanation,將「非阻塞」限定為瀏覽器/Node.js 提供的特定非同步 API(如計時器、網路請求),並明確保留同步程式碼、CPU 密集型
JavaScript 與同步 Node I/O 會占用事件迴圈;不要將非阻塞描述成 JavaScript 本身的普遍特性。
In `@packages/core/src/data/questions/ydkjs-ap-2-callbacks.json`:
- Line 36: Update the cache-hit condition in the getData examples to check cache
membership with hasOwnProperty rather than cached-value truthiness, preserving
cached 0, false, and empty-string values. Apply this at
packages/core/src/data/questions/ydkjs-ap-2-callbacks.json lines 36-36, 59-59,
and 82-82.
In `@packages/core/src/data/questions/ydkjs-ap-5-program-performance.json`:
- Around line 9-21: Revise the Web Worker explanations in
packages/core/src/data/questions/ydkjs-ap-5-program-performance.json at lines
9-21, 28-40, 47-59, and 116-128: retain that ordinary variables are isolated,
but clarify that SharedArrayBuffer with Atomics enables intentional shared
memory; describe postMessage/message as the normal, not exclusive, communication
mechanism; and distinguish structured cloning from transferable ownership for
ArrayBuffer, MessagePort, and ImageBitmap. Update the corresponding options,
answers, and explanations consistently.
In `@packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json`:
- Around line 120-132: Update the question’s option a and its explanation so
they no longer claim observables share a generator-based foundation: state that
iterable sequences and generator coroutines use generator mechanisms, while
observables use a separate closure/listener-based multi-value event pattern.
Preserve the distinction that all three address limitations of Promise, but
avoid describing them as one shared implementation or foundation.
In `@packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json`:
- Around line 93-110: 更新題目與解釋中對 TC39 階段的描述:明確指出 Stage 0 才是最早期階段,並將 Stage 4
描述為提案已定案、將納入正式規範,不要限定為「下一版」規範。同步檢查 prompt、選項 a、explanation 與
verify.manual,保留其餘關於早期提案風險的內容。
In `@packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json`:
- Around line 74-95: Update the run function’s step error handling to use an
explicit resume mode rather than the truthiness of err, so rejected Promises
with 0, false, empty string, null, or undefined invoke it.throw and reach the
generator’s catch block. Preserve it.next for successful resolutions and pass
the mode through both Promise callbacks.
- Around line 120-137: Update the explanation in question “ydkjs-es6-4-q6” to
describe async/await as a conceptual analogue to the generator-plus-driver
pattern, not literal generator syntax sugar. Clarify that async functions return
Promises and use native await suspension, whereas generators expose
next()/throw() and iterator objects; retain the comparison of their similar
control flow without claiming they are the same mechanism.
In `@packages/core/src/data/questions/ydkjs-es6-5-collections.json`:
- Around line 120-140: Update the WeakMap question’s topic and explanation to
state that keys may be objects or non-registered Symbols, while primitive
strings and numbers remain invalid. Preserve the existing string-key example,
answer, and verification output, and adjust only the descriptions that
incorrectly claim keys must always be objects.
In `@packages/core/src/data/questions/ydkjs-es6-6-new-apis.json`:
- Around line 120-140: Update the explanation for question “ydkjs-es6-6-q6” to
define Number.EPSILON as the gap between 1 and the next representable Number,
not a universal floating-point tolerance. Preserve the current example’s
false/true result, but state that larger magnitudes require a magnitude-aware or
domain-specific tolerance, using values such as 1000.1 + 1000.2 versus 2000.3 as
the boundary example.
In `@packages/core/src/data/questions/ydkjs-sc-5-closures.json`:
- Line 90: Update the explanation in the relevant YDKJS question entry to
replace the stale “jsa-2-q8” cross-reference with the correct dataset question
ID for the let-based solution, or remove the cross-reference if no matching
target exists. Preserve the rest of the explanation unchanged.
In `@packages/core/src/data/questions/ydkjs-tg-1-types.json`:
- Around line 127-136: Update the explanation for answer option “a” and the
corresponding “explanation” field to scope typeof’s no-throw safety specifically
to unresolvable or undeclared identifiers. Remove the claim that it is safe for
any input, and do not imply that let/const bindings in their temporal dead zone
are handled safely; preserve the existing null caveat and overall rationale.
In `@packages/core/src/data/questions/ydkjs-tg-3-native-functions.json`:
- Line 9: Update the topic text in the native-functions entry to avoid claiming
that Object.prototype.toString.call precisely determines types or reads an
internal [[Class]] marker. Reword it to describe the result as built-in tags, or
the tags returned for these values, while preserving the existing explanation’s
scope.
In `@packages/core/src/data/questions/ydkjs-ug-3-series-overview.json`:
- Line 13: Update the arrow-function example and its expected answer to describe
lexical this as the surrounding CommonJS module context (module.exports), not
the global object. Keep the regular method’s this behavior unchanged and ensure
the explanation reflects that this.name resolves to undefined from that binding.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5a4f6ed1-ae65-4dd9-a37b-2cd050668de5

📥 Commits

Reviewing files that changed from the base of the PR and between 79532aa and 947474c.

📒 Files selected for processing (47)
  • apps/mobile/app/(tabs)/index.tsx
  • apps/mobile/screens/Home.tsx
  • apps/mobile/screens/TopicBooks.tsx
  • apps/web/src/App.tsx
  • apps/web/src/screens/Home.tsx
  • apps/web/src/screens/TopicBooks.tsx
  • packages/core/src/data/chapters.ts
  • packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json
  • packages/core/src/data/questions/ydkjs-ap-2-callbacks.json
  • packages/core/src/data/questions/ydkjs-ap-3-promises.json
  • packages/core/src/data/questions/ydkjs-ap-4-generators.json
  • packages/core/src/data/questions/ydkjs-ap-5-program-performance.json
  • packages/core/src/data/questions/ydkjs-ap-6-benchmarking-tuning.json
  • packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json
  • packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json
  • packages/core/src/data/questions/ydkjs-es6-2-syntax.json
  • packages/core/src/data/questions/ydkjs-es6-3-code-organization.json
  • packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json
  • packages/core/src/data/questions/ydkjs-es6-5-collections.json
  • packages/core/src/data/questions/ydkjs-es6-6-new-apis.json
  • packages/core/src/data/questions/ydkjs-es6-7-metaprogramming.json
  • packages/core/src/data/questions/ydkjs-es6-8-beyond-es6.json
  • packages/core/src/data/questions/ydkjs-sc-1-what-is-scope.json
  • packages/core/src/data/questions/ydkjs-sc-2-lexical-scope.json
  • packages/core/src/data/questions/ydkjs-sc-3-function-block-scope.json
  • packages/core/src/data/questions/ydkjs-sc-4-hoisting.json
  • packages/core/src/data/questions/ydkjs-sc-5-closures.json
  • packages/core/src/data/questions/ydkjs-sc-6-dynamic-scope.json
  • packages/core/src/data/questions/ydkjs-sc-7-block-scope-alternatives.json
  • packages/core/src/data/questions/ydkjs-tg-1-types.json
  • packages/core/src/data/questions/ydkjs-tg-2-values.json
  • packages/core/src/data/questions/ydkjs-tg-3-native-functions.json
  • packages/core/src/data/questions/ydkjs-tg-4-coercion.json
  • packages/core/src/data/questions/ydkjs-tg-5-syntax.json
  • packages/core/src/data/questions/ydkjs-tp-1-about-this.json
  • packages/core/src/data/questions/ydkjs-tp-2-this-all-explained.json
  • packages/core/src/data/questions/ydkjs-tp-3-objects.json
  • packages/core/src/data/questions/ydkjs-tp-4-mixing-objects-classes.json
  • packages/core/src/data/questions/ydkjs-tp-5-prototypes.json
  • packages/core/src/data/questions/ydkjs-tp-6-behavior-delegation.json
  • packages/core/src/data/questions/ydkjs-tp-7-es6-class.json
  • packages/core/src/data/questions/ydkjs-ug-1-into-programming.json
  • packages/core/src/data/questions/ydkjs-ug-2-into-javascript.json
  • packages/core/src/data/questions/ydkjs-ug-3-series-overview.json
  • packages/core/src/data/topics.ts
  • packages/core/src/index.ts
  • packages/core/src/types.ts

Comment threadpackages/core/src/data/questions/ydkjs-ap-2-callbacks.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-ap-5-program-performance.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-ap-7-advanced-async.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-es6-6-new-apis.json
Comment threadpackages/core/src/data/questions/ydkjs-sc-5-closures.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-tg-1-types.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-tg-3-native-functions.json Outdated
- 非阻塞限定為特定瀏覽器/Node API,同步/CPU密集程式碼仍會阻塞
- 快取查詢改用 hasOwnProperty,避免誤判假值(0/false/'')為未命中
- Web Worker:補充 SharedArrayBuffer+Atomics 例外、postMessage 標準管道措辭、structured clone 與 transferable object 的差異
- 修正 observable 誤植為建立在生成器機制上的說法
- 修正 TC39 Stage 1 誤標為最早期階段(應為 Stage 0)
- 修正生成器驅動函式用 err 真假值判斷、無法處理假值錯誤原因的 bug
- 軟化 async/await 為生成器語法糖的說法,改為概念類比
- WeakMap key 補充 ES2023 非註冊 Symbol 的例外
- Number.EPSILON 補充僅適用於接近 1 量級數值的限制
- 修正跨檔案題目引用的錯誤標號(Q4→Q8)
- typeof 安全性限定於未宣告識別字,TDZ 內的 let/const 仍會拋錯
- 軟化 Object.prototype.toString.call 讀取「內部 [[Class]] 標記」的說法
- 修正箭頭函式 this 在 Node CommonJS 模組下實為 module.exports,非全域物件
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Retsomm
Retsomm merged commit dc3f7af into mainJul 28, 2026
2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Retsomm
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' 新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構 by Retsomm · Pull Request #27 · Retsomm/EasyLearn · GitHub
Skip to content

新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構 - #27

Merged
Retsomm merged 2 commits into
mainfrom
dev
Jul 28, 2026
Merged

新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構#27
Retsomm merged 2 commits into
mainfrom
dev

Conversation

@Retsomm

@RetsommRetsomm commented Jul 28, 2026

Copy link
Copy Markdown
Owner
  • ydkjs-sc(作用域和閉包)、ydkjs-tp(this和物件原型)、ydkjs-tg(類型和語法)、 ydkjs-ap(異步和性能)、ydkjs-ug(起步上路)、ydkjs-es6(ES6及更新版本) 六章題目全部完成,每題程式碼片段皆以 node 實測後才寫入,並通過 validate-questions.mjs/tsc/next build 驗證
  • 新增 packages/core 的 Topic 抽象(types.ts + data/topics.ts), 首頁單一書籍卡片點入後先看到章節列表,再進入關卡列表(web + mobile 同步)

Summary by CodeRabbit

  • New Features
    • Added topic-based learning navigation on web and mobile.
    • Grouped related chapters into topics, with topic icons and progress summaries.
    • Added topic detail screens listing chapters and completion progress.
    • Improved back navigation between topics, chapters, and levels.
    • Added extensive JavaScript practice content covering scope, types, async programming, ES6+, objects, prototypes, classes, and performance.

- ydkjs-sc(作用域和閉包)、ydkjs-tp(this和物件原型)、ydkjs-tg(類型和語法)、
ydkjs-ap(異步和性能)、ydkjs-ug(起步上路)、ydkjs-es6(ES6及更新版本)
六章題目全部完成,每題程式碼片段皆以 node 實測後才寫入,並通過
validate-questions.mjs/tsc/next build 驗證
- 新增 packages/core 的 Topic 抽象(types.ts + data/topics.ts),
首頁單一書籍卡片點入後先看到章節列表,再進入關卡列表(web + mobile 同步)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
easy-learnReadyReadyPreview, CommentJul 28, 2026 8:37am

@coderabbitai

coderabbitaiBot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in:18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 299a5851-63c2-47ee-9add-eb290f966719

📥 Commits

Reviewing files that changed from the base of the PR and between 947474c and 530790a.

📒 Files selected for processing (12)
  • packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json
  • packages/core/src/data/questions/ydkjs-ap-2-callbacks.json
  • packages/core/src/data/questions/ydkjs-ap-5-program-performance.json
  • packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json
  • packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json
  • packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json
  • packages/core/src/data/questions/ydkjs-es6-5-collections.json
  • packages/core/src/data/questions/ydkjs-es6-6-new-apis.json
  • packages/core/src/data/questions/ydkjs-sc-5-closures.json
  • packages/core/src/data/questions/ydkjs-tg-1-types.json
  • packages/core/src/data/questions/ydkjs-tg-3-native-functions.json
  • packages/core/src/data/questions/ydkjs-ug-3-series-overview.json
📝 Walkthrough

Walkthrough

Adds grouped topic data and topic chapter navigation to the web and mobile apps. The core package gains six YDKJS chapters and numerous structured question datasets covering scope, types, objects, asynchronous JavaScript, ES6, and introductory programming concepts.

Changes

Topic learning flow

Layer / File(s)Summary
Topic catalog and navigation
packages/core/src/data/topics.ts, packages/core/src/types.ts, apps/web/src/..., apps/mobile/...
Topics aggregate chapters, Home cards route grouped topics to TopicBooks, and chapter back-navigation preserves topic context.
Topic chapter screens
apps/web/screens/TopicBooks.tsx, apps/mobile/screens/TopicBooks.tsx
New screens display topic metadata, chapter cards, completion counts, percentages, and progress bars.
YDKJS content integration
packages/core/src/data/chapters.ts, packages/core/src/data/questions/*
Six YDKJS chapters and structured question sets with answers, explanations, code samples, and verification data are added.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
participant Home
participant TopicBooks
participant LevelList
participant Progress
Home->>TopicBooks: open grouped topic
TopicBooks->>Progress: read completed levels
TopicBooks->>LevelList: open selected chapter
LevelList->>TopicBooks: return for grouped chapter
Loading

Possibly related PRs

  • Retsomm/EasyLearn#11: Introduces the mobile Home navigation structure extended by this topic-based routing.
  • Retsomm/EasyLearn#14: Modifies the Home topic/chapter card rendering that this change further integrates with topic navigation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedTitle accurately summarizes the main changes: adding YDKJS practice questions and changing the home navigation to a book→chapter two-level structure.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json`:
- Around line 120-137: 修正題目 ydkjs-ap-1-q6 的選項 a 與
explanation,將「非阻塞」限定為瀏覽器/Node.js 提供的特定非同步 API(如計時器、網路請求),並明確保留同步程式碼、CPU 密集型
JavaScript 與同步 Node I/O 會占用事件迴圈;不要將非阻塞描述成 JavaScript 本身的普遍特性。
In `@packages/core/src/data/questions/ydkjs-ap-2-callbacks.json`:
- Line 36: Update the cache-hit condition in the getData examples to check cache
membership with hasOwnProperty rather than cached-value truthiness, preserving
cached 0, false, and empty-string values. Apply this at
packages/core/src/data/questions/ydkjs-ap-2-callbacks.json lines 36-36, 59-59,
and 82-82.
In `@packages/core/src/data/questions/ydkjs-ap-5-program-performance.json`:
- Around line 9-21: Revise the Web Worker explanations in
packages/core/src/data/questions/ydkjs-ap-5-program-performance.json at lines
9-21, 28-40, 47-59, and 116-128: retain that ordinary variables are isolated,
but clarify that SharedArrayBuffer with Atomics enables intentional shared
memory; describe postMessage/message as the normal, not exclusive, communication
mechanism; and distinguish structured cloning from transferable ownership for
ArrayBuffer, MessagePort, and ImageBitmap. Update the corresponding options,
answers, and explanations consistently.
In `@packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json`:
- Around line 120-132: Update the question’s option a and its explanation so
they no longer claim observables share a generator-based foundation: state that
iterable sequences and generator coroutines use generator mechanisms, while
observables use a separate closure/listener-based multi-value event pattern.
Preserve the distinction that all three address limitations of Promise, but
avoid describing them as one shared implementation or foundation.
In `@packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json`:
- Around line 93-110: 更新題目與解釋中對 TC39 階段的描述:明確指出 Stage 0 才是最早期階段,並將 Stage 4
描述為提案已定案、將納入正式規範,不要限定為「下一版」規範。同步檢查 prompt、選項 a、explanation 與
verify.manual,保留其餘關於早期提案風險的內容。
In `@packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json`:
- Around line 74-95: Update the run function’s step error handling to use an
explicit resume mode rather than the truthiness of err, so rejected Promises
with 0, false, empty string, null, or undefined invoke it.throw and reach the
generator’s catch block. Preserve it.next for successful resolutions and pass
the mode through both Promise callbacks.
- Around line 120-137: Update the explanation in question “ydkjs-es6-4-q6” to
describe async/await as a conceptual analogue to the generator-plus-driver
pattern, not literal generator syntax sugar. Clarify that async functions return
Promises and use native await suspension, whereas generators expose
next()/throw() and iterator objects; retain the comparison of their similar
control flow without claiming they are the same mechanism.
In `@packages/core/src/data/questions/ydkjs-es6-5-collections.json`:
- Around line 120-140: Update the WeakMap question’s topic and explanation to
state that keys may be objects or non-registered Symbols, while primitive
strings and numbers remain invalid. Preserve the existing string-key example,
answer, and verification output, and adjust only the descriptions that
incorrectly claim keys must always be objects.
In `@packages/core/src/data/questions/ydkjs-es6-6-new-apis.json`:
- Around line 120-140: Update the explanation for question “ydkjs-es6-6-q6” to
define Number.EPSILON as the gap between 1 and the next representable Number,
not a universal floating-point tolerance. Preserve the current example’s
false/true result, but state that larger magnitudes require a magnitude-aware or
domain-specific tolerance, using values such as 1000.1 + 1000.2 versus 2000.3 as
the boundary example.
In `@packages/core/src/data/questions/ydkjs-sc-5-closures.json`:
- Line 90: Update the explanation in the relevant YDKJS question entry to
replace the stale “jsa-2-q8” cross-reference with the correct dataset question
ID for the let-based solution, or remove the cross-reference if no matching
target exists. Preserve the rest of the explanation unchanged.
In `@packages/core/src/data/questions/ydkjs-tg-1-types.json`:
- Around line 127-136: Update the explanation for answer option “a” and the
corresponding “explanation” field to scope typeof’s no-throw safety specifically
to unresolvable or undeclared identifiers. Remove the claim that it is safe for
any input, and do not imply that let/const bindings in their temporal dead zone
are handled safely; preserve the existing null caveat and overall rationale.
In `@packages/core/src/data/questions/ydkjs-tg-3-native-functions.json`:
- Line 9: Update the topic text in the native-functions entry to avoid claiming
that Object.prototype.toString.call precisely determines types or reads an
internal [[Class]] marker. Reword it to describe the result as built-in tags, or
the tags returned for these values, while preserving the existing explanation’s
scope.
In `@packages/core/src/data/questions/ydkjs-ug-3-series-overview.json`:
- Line 13: Update the arrow-function example and its expected answer to describe
lexical this as the surrounding CommonJS module context (module.exports), not
the global object. Keep the regular method’s this behavior unchanged and ensure
the explanation reflects that this.name resolves to undefined from that binding.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5a4f6ed1-ae65-4dd9-a37b-2cd050668de5

📥 Commits

Reviewing files that changed from the base of the PR and between 79532aa and 947474c.

📒 Files selected for processing (47)
  • apps/mobile/app/(tabs)/index.tsx
  • apps/mobile/screens/Home.tsx
  • apps/mobile/screens/TopicBooks.tsx
  • apps/web/src/App.tsx
  • apps/web/src/screens/Home.tsx
  • apps/web/src/screens/TopicBooks.tsx
  • packages/core/src/data/chapters.ts
  • packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json
  • packages/core/src/data/questions/ydkjs-ap-2-callbacks.json
  • packages/core/src/data/questions/ydkjs-ap-3-promises.json
  • packages/core/src/data/questions/ydkjs-ap-4-generators.json
  • packages/core/src/data/questions/ydkjs-ap-5-program-performance.json
  • packages/core/src/data/questions/ydkjs-ap-6-benchmarking-tuning.json
  • packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json
  • packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json
  • packages/core/src/data/questions/ydkjs-es6-2-syntax.json
  • packages/core/src/data/questions/ydkjs-es6-3-code-organization.json
  • packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json
  • packages/core/src/data/questions/ydkjs-es6-5-collections.json
  • packages/core/src/data/questions/ydkjs-es6-6-new-apis.json
  • packages/core/src/data/questions/ydkjs-es6-7-metaprogramming.json
  • packages/core/src/data/questions/ydkjs-es6-8-beyond-es6.json
  • packages/core/src/data/questions/ydkjs-sc-1-what-is-scope.json
  • packages/core/src/data/questions/ydkjs-sc-2-lexical-scope.json
  • packages/core/src/data/questions/ydkjs-sc-3-function-block-scope.json
  • packages/core/src/data/questions/ydkjs-sc-4-hoisting.json
  • packages/core/src/data/questions/ydkjs-sc-5-closures.json
  • packages/core/src/data/questions/ydkjs-sc-6-dynamic-scope.json
  • packages/core/src/data/questions/ydkjs-sc-7-block-scope-alternatives.json
  • packages/core/src/data/questions/ydkjs-tg-1-types.json
  • packages/core/src/data/questions/ydkjs-tg-2-values.json
  • packages/core/src/data/questions/ydkjs-tg-3-native-functions.json
  • packages/core/src/data/questions/ydkjs-tg-4-coercion.json
  • packages/core/src/data/questions/ydkjs-tg-5-syntax.json
  • packages/core/src/data/questions/ydkjs-tp-1-about-this.json
  • packages/core/src/data/questions/ydkjs-tp-2-this-all-explained.json
  • packages/core/src/data/questions/ydkjs-tp-3-objects.json
  • packages/core/src/data/questions/ydkjs-tp-4-mixing-objects-classes.json
  • packages/core/src/data/questions/ydkjs-tp-5-prototypes.json
  • packages/core/src/data/questions/ydkjs-tp-6-behavior-delegation.json
  • packages/core/src/data/questions/ydkjs-tp-7-es6-class.json
  • packages/core/src/data/questions/ydkjs-ug-1-into-programming.json
  • packages/core/src/data/questions/ydkjs-ug-2-into-javascript.json
  • packages/core/src/data/questions/ydkjs-ug-3-series-overview.json
  • packages/core/src/data/topics.ts
  • packages/core/src/index.ts
  • packages/core/src/types.ts

Comment threadpackages/core/src/data/questions/ydkjs-ap-2-callbacks.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-ap-5-program-performance.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-ap-7-advanced-async.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-es6-6-new-apis.json
Comment threadpackages/core/src/data/questions/ydkjs-sc-5-closures.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-tg-1-types.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-tg-3-native-functions.json Outdated
- 非阻塞限定為特定瀏覽器/Node API,同步/CPU密集程式碼仍會阻塞
- 快取查詢改用 hasOwnProperty,避免誤判假值(0/false/'')為未命中
- Web Worker:補充 SharedArrayBuffer+Atomics 例外、postMessage 標準管道措辭、structured clone 與 transferable object 的差異
- 修正 observable 誤植為建立在生成器機制上的說法
- 修正 TC39 Stage 1 誤標為最早期階段(應為 Stage 0)
- 修正生成器驅動函式用 err 真假值判斷、無法處理假值錯誤原因的 bug
- 軟化 async/await 為生成器語法糖的說法,改為概念類比
- WeakMap key 補充 ES2023 非註冊 Symbol 的例外
- Number.EPSILON 補充僅適用於接近 1 量級數值的限制
- 修正跨檔案題目引用的錯誤標號(Q4→Q8)
- typeof 安全性限定於未宣告識別字,TDZ 內的 let/const 仍會拋錯
- 軟化 Object.prototype.toString.call 讀取「內部 [[Class]] 標記」的說法
- 修正箭頭函式 this 在 Node CommonJS 模組下實為 module.exports,非全域物件
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Retsomm
Retsomm merged commit dc3f7af into mainJul 28, 2026
2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Retsomm
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' 新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構 by Retsomm · Pull Request #27 · Retsomm/EasyLearn · GitHub
Skip to content

新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構 - #27

Merged
Retsomm merged 2 commits into
mainfrom
dev
Jul 28, 2026
Merged

新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構#27
Retsomm merged 2 commits into
mainfrom
dev

Conversation

@Retsomm

@RetsommRetsomm commented Jul 28, 2026

Copy link
Copy Markdown
Owner
  • ydkjs-sc(作用域和閉包)、ydkjs-tp(this和物件原型)、ydkjs-tg(類型和語法)、 ydkjs-ap(異步和性能)、ydkjs-ug(起步上路)、ydkjs-es6(ES6及更新版本) 六章題目全部完成,每題程式碼片段皆以 node 實測後才寫入,並通過 validate-questions.mjs/tsc/next build 驗證
  • 新增 packages/core 的 Topic 抽象(types.ts + data/topics.ts), 首頁單一書籍卡片點入後先看到章節列表,再進入關卡列表(web + mobile 同步)

Summary by CodeRabbit

  • New Features
    • Added topic-based learning navigation on web and mobile.
    • Grouped related chapters into topics, with topic icons and progress summaries.
    • Added topic detail screens listing chapters and completion progress.
    • Improved back navigation between topics, chapters, and levels.
    • Added extensive JavaScript practice content covering scope, types, async programming, ES6+, objects, prototypes, classes, and performance.

- ydkjs-sc(作用域和閉包)、ydkjs-tp(this和物件原型)、ydkjs-tg(類型和語法)、
ydkjs-ap(異步和性能)、ydkjs-ug(起步上路)、ydkjs-es6(ES6及更新版本)
六章題目全部完成,每題程式碼片段皆以 node 實測後才寫入,並通過
validate-questions.mjs/tsc/next build 驗證
- 新增 packages/core 的 Topic 抽象(types.ts + data/topics.ts),
首頁單一書籍卡片點入後先看到章節列表,再進入關卡列表(web + mobile 同步)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
easy-learnReadyReadyPreview, CommentJul 28, 2026 8:37am

@coderabbitai

coderabbitaiBot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in:18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 299a5851-63c2-47ee-9add-eb290f966719

📥 Commits

Reviewing files that changed from the base of the PR and between 947474c and 530790a.

📒 Files selected for processing (12)
  • packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json
  • packages/core/src/data/questions/ydkjs-ap-2-callbacks.json
  • packages/core/src/data/questions/ydkjs-ap-5-program-performance.json
  • packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json
  • packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json
  • packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json
  • packages/core/src/data/questions/ydkjs-es6-5-collections.json
  • packages/core/src/data/questions/ydkjs-es6-6-new-apis.json
  • packages/core/src/data/questions/ydkjs-sc-5-closures.json
  • packages/core/src/data/questions/ydkjs-tg-1-types.json
  • packages/core/src/data/questions/ydkjs-tg-3-native-functions.json
  • packages/core/src/data/questions/ydkjs-ug-3-series-overview.json
📝 Walkthrough

Walkthrough

Adds grouped topic data and topic chapter navigation to the web and mobile apps. The core package gains six YDKJS chapters and numerous structured question datasets covering scope, types, objects, asynchronous JavaScript, ES6, and introductory programming concepts.

Changes

Topic learning flow

Layer / File(s)Summary
Topic catalog and navigation
packages/core/src/data/topics.ts, packages/core/src/types.ts, apps/web/src/..., apps/mobile/...
Topics aggregate chapters, Home cards route grouped topics to TopicBooks, and chapter back-navigation preserves topic context.
Topic chapter screens
apps/web/screens/TopicBooks.tsx, apps/mobile/screens/TopicBooks.tsx
New screens display topic metadata, chapter cards, completion counts, percentages, and progress bars.
YDKJS content integration
packages/core/src/data/chapters.ts, packages/core/src/data/questions/*
Six YDKJS chapters and structured question sets with answers, explanations, code samples, and verification data are added.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
participant Home
participant TopicBooks
participant LevelList
participant Progress
Home->>TopicBooks: open grouped topic
TopicBooks->>Progress: read completed levels
TopicBooks->>LevelList: open selected chapter
LevelList->>TopicBooks: return for grouped chapter
Loading

Possibly related PRs

  • Retsomm/EasyLearn#11: Introduces the mobile Home navigation structure extended by this topic-based routing.
  • Retsomm/EasyLearn#14: Modifies the Home topic/chapter card rendering that this change further integrates with topic navigation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedTitle accurately summarizes the main changes: adding YDKJS practice questions and changing the home navigation to a book→chapter two-level structure.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json`:
- Around line 120-137: 修正題目 ydkjs-ap-1-q6 的選項 a 與
explanation,將「非阻塞」限定為瀏覽器/Node.js 提供的特定非同步 API(如計時器、網路請求),並明確保留同步程式碼、CPU 密集型
JavaScript 與同步 Node I/O 會占用事件迴圈;不要將非阻塞描述成 JavaScript 本身的普遍特性。
In `@packages/core/src/data/questions/ydkjs-ap-2-callbacks.json`:
- Line 36: Update the cache-hit condition in the getData examples to check cache
membership with hasOwnProperty rather than cached-value truthiness, preserving
cached 0, false, and empty-string values. Apply this at
packages/core/src/data/questions/ydkjs-ap-2-callbacks.json lines 36-36, 59-59,
and 82-82.
In `@packages/core/src/data/questions/ydkjs-ap-5-program-performance.json`:
- Around line 9-21: Revise the Web Worker explanations in
packages/core/src/data/questions/ydkjs-ap-5-program-performance.json at lines
9-21, 28-40, 47-59, and 116-128: retain that ordinary variables are isolated,
but clarify that SharedArrayBuffer with Atomics enables intentional shared
memory; describe postMessage/message as the normal, not exclusive, communication
mechanism; and distinguish structured cloning from transferable ownership for
ArrayBuffer, MessagePort, and ImageBitmap. Update the corresponding options,
answers, and explanations consistently.
In `@packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json`:
- Around line 120-132: Update the question’s option a and its explanation so
they no longer claim observables share a generator-based foundation: state that
iterable sequences and generator coroutines use generator mechanisms, while
observables use a separate closure/listener-based multi-value event pattern.
Preserve the distinction that all three address limitations of Promise, but
avoid describing them as one shared implementation or foundation.
In `@packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json`:
- Around line 93-110: 更新題目與解釋中對 TC39 階段的描述:明確指出 Stage 0 才是最早期階段,並將 Stage 4
描述為提案已定案、將納入正式規範,不要限定為「下一版」規範。同步檢查 prompt、選項 a、explanation 與
verify.manual,保留其餘關於早期提案風險的內容。
In `@packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json`:
- Around line 74-95: Update the run function’s step error handling to use an
explicit resume mode rather than the truthiness of err, so rejected Promises
with 0, false, empty string, null, or undefined invoke it.throw and reach the
generator’s catch block. Preserve it.next for successful resolutions and pass
the mode through both Promise callbacks.
- Around line 120-137: Update the explanation in question “ydkjs-es6-4-q6” to
describe async/await as a conceptual analogue to the generator-plus-driver
pattern, not literal generator syntax sugar. Clarify that async functions return
Promises and use native await suspension, whereas generators expose
next()/throw() and iterator objects; retain the comparison of their similar
control flow without claiming they are the same mechanism.
In `@packages/core/src/data/questions/ydkjs-es6-5-collections.json`:
- Around line 120-140: Update the WeakMap question’s topic and explanation to
state that keys may be objects or non-registered Symbols, while primitive
strings and numbers remain invalid. Preserve the existing string-key example,
answer, and verification output, and adjust only the descriptions that
incorrectly claim keys must always be objects.
In `@packages/core/src/data/questions/ydkjs-es6-6-new-apis.json`:
- Around line 120-140: Update the explanation for question “ydkjs-es6-6-q6” to
define Number.EPSILON as the gap between 1 and the next representable Number,
not a universal floating-point tolerance. Preserve the current example’s
false/true result, but state that larger magnitudes require a magnitude-aware or
domain-specific tolerance, using values such as 1000.1 + 1000.2 versus 2000.3 as
the boundary example.
In `@packages/core/src/data/questions/ydkjs-sc-5-closures.json`:
- Line 90: Update the explanation in the relevant YDKJS question entry to
replace the stale “jsa-2-q8” cross-reference with the correct dataset question
ID for the let-based solution, or remove the cross-reference if no matching
target exists. Preserve the rest of the explanation unchanged.
In `@packages/core/src/data/questions/ydkjs-tg-1-types.json`:
- Around line 127-136: Update the explanation for answer option “a” and the
corresponding “explanation” field to scope typeof’s no-throw safety specifically
to unresolvable or undeclared identifiers. Remove the claim that it is safe for
any input, and do not imply that let/const bindings in their temporal dead zone
are handled safely; preserve the existing null caveat and overall rationale.
In `@packages/core/src/data/questions/ydkjs-tg-3-native-functions.json`:
- Line 9: Update the topic text in the native-functions entry to avoid claiming
that Object.prototype.toString.call precisely determines types or reads an
internal [[Class]] marker. Reword it to describe the result as built-in tags, or
the tags returned for these values, while preserving the existing explanation’s
scope.
In `@packages/core/src/data/questions/ydkjs-ug-3-series-overview.json`:
- Line 13: Update the arrow-function example and its expected answer to describe
lexical this as the surrounding CommonJS module context (module.exports), not
the global object. Keep the regular method’s this behavior unchanged and ensure
the explanation reflects that this.name resolves to undefined from that binding.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5a4f6ed1-ae65-4dd9-a37b-2cd050668de5

📥 Commits

Reviewing files that changed from the base of the PR and between 79532aa and 947474c.

📒 Files selected for processing (47)
  • apps/mobile/app/(tabs)/index.tsx
  • apps/mobile/screens/Home.tsx
  • apps/mobile/screens/TopicBooks.tsx
  • apps/web/src/App.tsx
  • apps/web/src/screens/Home.tsx
  • apps/web/src/screens/TopicBooks.tsx
  • packages/core/src/data/chapters.ts
  • packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json
  • packages/core/src/data/questions/ydkjs-ap-2-callbacks.json
  • packages/core/src/data/questions/ydkjs-ap-3-promises.json
  • packages/core/src/data/questions/ydkjs-ap-4-generators.json
  • packages/core/src/data/questions/ydkjs-ap-5-program-performance.json
  • packages/core/src/data/questions/ydkjs-ap-6-benchmarking-tuning.json
  • packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json
  • packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json
  • packages/core/src/data/questions/ydkjs-es6-2-syntax.json
  • packages/core/src/data/questions/ydkjs-es6-3-code-organization.json
  • packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json
  • packages/core/src/data/questions/ydkjs-es6-5-collections.json
  • packages/core/src/data/questions/ydkjs-es6-6-new-apis.json
  • packages/core/src/data/questions/ydkjs-es6-7-metaprogramming.json
  • packages/core/src/data/questions/ydkjs-es6-8-beyond-es6.json
  • packages/core/src/data/questions/ydkjs-sc-1-what-is-scope.json
  • packages/core/src/data/questions/ydkjs-sc-2-lexical-scope.json
  • packages/core/src/data/questions/ydkjs-sc-3-function-block-scope.json
  • packages/core/src/data/questions/ydkjs-sc-4-hoisting.json
  • packages/core/src/data/questions/ydkjs-sc-5-closures.json
  • packages/core/src/data/questions/ydkjs-sc-6-dynamic-scope.json
  • packages/core/src/data/questions/ydkjs-sc-7-block-scope-alternatives.json
  • packages/core/src/data/questions/ydkjs-tg-1-types.json
  • packages/core/src/data/questions/ydkjs-tg-2-values.json
  • packages/core/src/data/questions/ydkjs-tg-3-native-functions.json
  • packages/core/src/data/questions/ydkjs-tg-4-coercion.json
  • packages/core/src/data/questions/ydkjs-tg-5-syntax.json
  • packages/core/src/data/questions/ydkjs-tp-1-about-this.json
  • packages/core/src/data/questions/ydkjs-tp-2-this-all-explained.json
  • packages/core/src/data/questions/ydkjs-tp-3-objects.json
  • packages/core/src/data/questions/ydkjs-tp-4-mixing-objects-classes.json
  • packages/core/src/data/questions/ydkjs-tp-5-prototypes.json
  • packages/core/src/data/questions/ydkjs-tp-6-behavior-delegation.json
  • packages/core/src/data/questions/ydkjs-tp-7-es6-class.json
  • packages/core/src/data/questions/ydkjs-ug-1-into-programming.json
  • packages/core/src/data/questions/ydkjs-ug-2-into-javascript.json
  • packages/core/src/data/questions/ydkjs-ug-3-series-overview.json
  • packages/core/src/data/topics.ts
  • packages/core/src/index.ts
  • packages/core/src/types.ts

Comment threadpackages/core/src/data/questions/ydkjs-ap-2-callbacks.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-ap-5-program-performance.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-ap-7-advanced-async.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-es6-6-new-apis.json
Comment threadpackages/core/src/data/questions/ydkjs-sc-5-closures.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-tg-1-types.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-tg-3-native-functions.json Outdated
- 非阻塞限定為特定瀏覽器/Node API,同步/CPU密集程式碼仍會阻塞
- 快取查詢改用 hasOwnProperty,避免誤判假值(0/false/'')為未命中
- Web Worker:補充 SharedArrayBuffer+Atomics 例外、postMessage 標準管道措辭、structured clone 與 transferable object 的差異
- 修正 observable 誤植為建立在生成器機制上的說法
- 修正 TC39 Stage 1 誤標為最早期階段(應為 Stage 0)
- 修正生成器驅動函式用 err 真假值判斷、無法處理假值錯誤原因的 bug
- 軟化 async/await 為生成器語法糖的說法,改為概念類比
- WeakMap key 補充 ES2023 非註冊 Symbol 的例外
- Number.EPSILON 補充僅適用於接近 1 量級數值的限制
- 修正跨檔案題目引用的錯誤標號(Q4→Q8)
- typeof 安全性限定於未宣告識別字,TDZ 內的 let/const 仍會拋錯
- 軟化 Object.prototype.toString.call 讀取「內部 [[Class]] 標記」的說法
- 修正箭頭函式 this 在 Node CommonJS 模組下實為 module.exports,非全域物件
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Retsomm
Retsomm merged commit dc3f7af into mainJul 28, 2026
2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Retsomm
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' 新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構 by Retsomm · Pull Request #27 · Retsomm/EasyLearn · GitHub
Skip to content

新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構 - #27

Merged
Retsomm merged 2 commits into
mainfrom
dev
Jul 28, 2026
Merged

新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構#27
Retsomm merged 2 commits into
mainfrom
dev

Conversation

@Retsomm

@RetsommRetsomm commented Jul 28, 2026

Copy link
Copy Markdown
Owner
  • ydkjs-sc(作用域和閉包)、ydkjs-tp(this和物件原型)、ydkjs-tg(類型和語法)、 ydkjs-ap(異步和性能)、ydkjs-ug(起步上路)、ydkjs-es6(ES6及更新版本) 六章題目全部完成,每題程式碼片段皆以 node 實測後才寫入,並通過 validate-questions.mjs/tsc/next build 驗證
  • 新增 packages/core 的 Topic 抽象(types.ts + data/topics.ts), 首頁單一書籍卡片點入後先看到章節列表,再進入關卡列表(web + mobile 同步)

Summary by CodeRabbit

  • New Features
    • Added topic-based learning navigation on web and mobile.
    • Grouped related chapters into topics, with topic icons and progress summaries.
    • Added topic detail screens listing chapters and completion progress.
    • Improved back navigation between topics, chapters, and levels.
    • Added extensive JavaScript practice content covering scope, types, async programming, ES6+, objects, prototypes, classes, and performance.

- ydkjs-sc(作用域和閉包)、ydkjs-tp(this和物件原型)、ydkjs-tg(類型和語法)、
ydkjs-ap(異步和性能)、ydkjs-ug(起步上路)、ydkjs-es6(ES6及更新版本)
六章題目全部完成,每題程式碼片段皆以 node 實測後才寫入,並通過
validate-questions.mjs/tsc/next build 驗證
- 新增 packages/core 的 Topic 抽象(types.ts + data/topics.ts),
首頁單一書籍卡片點入後先看到章節列表,再進入關卡列表(web + mobile 同步)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
easy-learnReadyReadyPreview, CommentJul 28, 2026 8:37am

@coderabbitai

coderabbitaiBot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in:18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 299a5851-63c2-47ee-9add-eb290f966719

📥 Commits

Reviewing files that changed from the base of the PR and between 947474c and 530790a.

📒 Files selected for processing (12)
  • packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json
  • packages/core/src/data/questions/ydkjs-ap-2-callbacks.json
  • packages/core/src/data/questions/ydkjs-ap-5-program-performance.json
  • packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json
  • packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json
  • packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json
  • packages/core/src/data/questions/ydkjs-es6-5-collections.json
  • packages/core/src/data/questions/ydkjs-es6-6-new-apis.json
  • packages/core/src/data/questions/ydkjs-sc-5-closures.json
  • packages/core/src/data/questions/ydkjs-tg-1-types.json
  • packages/core/src/data/questions/ydkjs-tg-3-native-functions.json
  • packages/core/src/data/questions/ydkjs-ug-3-series-overview.json
📝 Walkthrough

Walkthrough

Adds grouped topic data and topic chapter navigation to the web and mobile apps. The core package gains six YDKJS chapters and numerous structured question datasets covering scope, types, objects, asynchronous JavaScript, ES6, and introductory programming concepts.

Changes

Topic learning flow

Layer / File(s)Summary
Topic catalog and navigation
packages/core/src/data/topics.ts, packages/core/src/types.ts, apps/web/src/..., apps/mobile/...
Topics aggregate chapters, Home cards route grouped topics to TopicBooks, and chapter back-navigation preserves topic context.
Topic chapter screens
apps/web/screens/TopicBooks.tsx, apps/mobile/screens/TopicBooks.tsx
New screens display topic metadata, chapter cards, completion counts, percentages, and progress bars.
YDKJS content integration
packages/core/src/data/chapters.ts, packages/core/src/data/questions/*
Six YDKJS chapters and structured question sets with answers, explanations, code samples, and verification data are added.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
participant Home
participant TopicBooks
participant LevelList
participant Progress
Home->>TopicBooks: open grouped topic
TopicBooks->>Progress: read completed levels
TopicBooks->>LevelList: open selected chapter
LevelList->>TopicBooks: return for grouped chapter
Loading

Possibly related PRs

  • Retsomm/EasyLearn#11: Introduces the mobile Home navigation structure extended by this topic-based routing.
  • Retsomm/EasyLearn#14: Modifies the Home topic/chapter card rendering that this change further integrates with topic navigation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedTitle accurately summarizes the main changes: adding YDKJS practice questions and changing the home navigation to a book→chapter two-level structure.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json`:
- Around line 120-137: 修正題目 ydkjs-ap-1-q6 的選項 a 與
explanation,將「非阻塞」限定為瀏覽器/Node.js 提供的特定非同步 API(如計時器、網路請求),並明確保留同步程式碼、CPU 密集型
JavaScript 與同步 Node I/O 會占用事件迴圈;不要將非阻塞描述成 JavaScript 本身的普遍特性。
In `@packages/core/src/data/questions/ydkjs-ap-2-callbacks.json`:
- Line 36: Update the cache-hit condition in the getData examples to check cache
membership with hasOwnProperty rather than cached-value truthiness, preserving
cached 0, false, and empty-string values. Apply this at
packages/core/src/data/questions/ydkjs-ap-2-callbacks.json lines 36-36, 59-59,
and 82-82.
In `@packages/core/src/data/questions/ydkjs-ap-5-program-performance.json`:
- Around line 9-21: Revise the Web Worker explanations in
packages/core/src/data/questions/ydkjs-ap-5-program-performance.json at lines
9-21, 28-40, 47-59, and 116-128: retain that ordinary variables are isolated,
but clarify that SharedArrayBuffer with Atomics enables intentional shared
memory; describe postMessage/message as the normal, not exclusive, communication
mechanism; and distinguish structured cloning from transferable ownership for
ArrayBuffer, MessagePort, and ImageBitmap. Update the corresponding options,
answers, and explanations consistently.
In `@packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json`:
- Around line 120-132: Update the question’s option a and its explanation so
they no longer claim observables share a generator-based foundation: state that
iterable sequences and generator coroutines use generator mechanisms, while
observables use a separate closure/listener-based multi-value event pattern.
Preserve the distinction that all three address limitations of Promise, but
avoid describing them as one shared implementation or foundation.
In `@packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json`:
- Around line 93-110: 更新題目與解釋中對 TC39 階段的描述:明確指出 Stage 0 才是最早期階段,並將 Stage 4
描述為提案已定案、將納入正式規範,不要限定為「下一版」規範。同步檢查 prompt、選項 a、explanation 與
verify.manual,保留其餘關於早期提案風險的內容。
In `@packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json`:
- Around line 74-95: Update the run function’s step error handling to use an
explicit resume mode rather than the truthiness of err, so rejected Promises
with 0, false, empty string, null, or undefined invoke it.throw and reach the
generator’s catch block. Preserve it.next for successful resolutions and pass
the mode through both Promise callbacks.
- Around line 120-137: Update the explanation in question “ydkjs-es6-4-q6” to
describe async/await as a conceptual analogue to the generator-plus-driver
pattern, not literal generator syntax sugar. Clarify that async functions return
Promises and use native await suspension, whereas generators expose
next()/throw() and iterator objects; retain the comparison of their similar
control flow without claiming they are the same mechanism.
In `@packages/core/src/data/questions/ydkjs-es6-5-collections.json`:
- Around line 120-140: Update the WeakMap question’s topic and explanation to
state that keys may be objects or non-registered Symbols, while primitive
strings and numbers remain invalid. Preserve the existing string-key example,
answer, and verification output, and adjust only the descriptions that
incorrectly claim keys must always be objects.
In `@packages/core/src/data/questions/ydkjs-es6-6-new-apis.json`:
- Around line 120-140: Update the explanation for question “ydkjs-es6-6-q6” to
define Number.EPSILON as the gap between 1 and the next representable Number,
not a universal floating-point tolerance. Preserve the current example’s
false/true result, but state that larger magnitudes require a magnitude-aware or
domain-specific tolerance, using values such as 1000.1 + 1000.2 versus 2000.3 as
the boundary example.
In `@packages/core/src/data/questions/ydkjs-sc-5-closures.json`:
- Line 90: Update the explanation in the relevant YDKJS question entry to
replace the stale “jsa-2-q8” cross-reference with the correct dataset question
ID for the let-based solution, or remove the cross-reference if no matching
target exists. Preserve the rest of the explanation unchanged.
In `@packages/core/src/data/questions/ydkjs-tg-1-types.json`:
- Around line 127-136: Update the explanation for answer option “a” and the
corresponding “explanation” field to scope typeof’s no-throw safety specifically
to unresolvable or undeclared identifiers. Remove the claim that it is safe for
any input, and do not imply that let/const bindings in their temporal dead zone
are handled safely; preserve the existing null caveat and overall rationale.
In `@packages/core/src/data/questions/ydkjs-tg-3-native-functions.json`:
- Line 9: Update the topic text in the native-functions entry to avoid claiming
that Object.prototype.toString.call precisely determines types or reads an
internal [[Class]] marker. Reword it to describe the result as built-in tags, or
the tags returned for these values, while preserving the existing explanation’s
scope.
In `@packages/core/src/data/questions/ydkjs-ug-3-series-overview.json`:
- Line 13: Update the arrow-function example and its expected answer to describe
lexical this as the surrounding CommonJS module context (module.exports), not
the global object. Keep the regular method’s this behavior unchanged and ensure
the explanation reflects that this.name resolves to undefined from that binding.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5a4f6ed1-ae65-4dd9-a37b-2cd050668de5

📥 Commits

Reviewing files that changed from the base of the PR and between 79532aa and 947474c.

📒 Files selected for processing (47)
  • apps/mobile/app/(tabs)/index.tsx
  • apps/mobile/screens/Home.tsx
  • apps/mobile/screens/TopicBooks.tsx
  • apps/web/src/App.tsx
  • apps/web/src/screens/Home.tsx
  • apps/web/src/screens/TopicBooks.tsx
  • packages/core/src/data/chapters.ts
  • packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json
  • packages/core/src/data/questions/ydkjs-ap-2-callbacks.json
  • packages/core/src/data/questions/ydkjs-ap-3-promises.json
  • packages/core/src/data/questions/ydkjs-ap-4-generators.json
  • packages/core/src/data/questions/ydkjs-ap-5-program-performance.json
  • packages/core/src/data/questions/ydkjs-ap-6-benchmarking-tuning.json
  • packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json
  • packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json
  • packages/core/src/data/questions/ydkjs-es6-2-syntax.json
  • packages/core/src/data/questions/ydkjs-es6-3-code-organization.json
  • packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json
  • packages/core/src/data/questions/ydkjs-es6-5-collections.json
  • packages/core/src/data/questions/ydkjs-es6-6-new-apis.json
  • packages/core/src/data/questions/ydkjs-es6-7-metaprogramming.json
  • packages/core/src/data/questions/ydkjs-es6-8-beyond-es6.json
  • packages/core/src/data/questions/ydkjs-sc-1-what-is-scope.json
  • packages/core/src/data/questions/ydkjs-sc-2-lexical-scope.json
  • packages/core/src/data/questions/ydkjs-sc-3-function-block-scope.json
  • packages/core/src/data/questions/ydkjs-sc-4-hoisting.json
  • packages/core/src/data/questions/ydkjs-sc-5-closures.json
  • packages/core/src/data/questions/ydkjs-sc-6-dynamic-scope.json
  • packages/core/src/data/questions/ydkjs-sc-7-block-scope-alternatives.json
  • packages/core/src/data/questions/ydkjs-tg-1-types.json
  • packages/core/src/data/questions/ydkjs-tg-2-values.json
  • packages/core/src/data/questions/ydkjs-tg-3-native-functions.json
  • packages/core/src/data/questions/ydkjs-tg-4-coercion.json
  • packages/core/src/data/questions/ydkjs-tg-5-syntax.json
  • packages/core/src/data/questions/ydkjs-tp-1-about-this.json
  • packages/core/src/data/questions/ydkjs-tp-2-this-all-explained.json
  • packages/core/src/data/questions/ydkjs-tp-3-objects.json
  • packages/core/src/data/questions/ydkjs-tp-4-mixing-objects-classes.json
  • packages/core/src/data/questions/ydkjs-tp-5-prototypes.json
  • packages/core/src/data/questions/ydkjs-tp-6-behavior-delegation.json
  • packages/core/src/data/questions/ydkjs-tp-7-es6-class.json
  • packages/core/src/data/questions/ydkjs-ug-1-into-programming.json
  • packages/core/src/data/questions/ydkjs-ug-2-into-javascript.json
  • packages/core/src/data/questions/ydkjs-ug-3-series-overview.json
  • packages/core/src/data/topics.ts
  • packages/core/src/index.ts
  • packages/core/src/types.ts

Comment threadpackages/core/src/data/questions/ydkjs-ap-2-callbacks.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-ap-5-program-performance.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-ap-7-advanced-async.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-es6-6-new-apis.json
Comment threadpackages/core/src/data/questions/ydkjs-sc-5-closures.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-tg-1-types.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-tg-3-native-functions.json Outdated
- 非阻塞限定為特定瀏覽器/Node API,同步/CPU密集程式碼仍會阻塞
- 快取查詢改用 hasOwnProperty,避免誤判假值(0/false/'')為未命中
- Web Worker:補充 SharedArrayBuffer+Atomics 例外、postMessage 標準管道措辭、structured clone 與 transferable object 的差異
- 修正 observable 誤植為建立在生成器機制上的說法
- 修正 TC39 Stage 1 誤標為最早期階段(應為 Stage 0)
- 修正生成器驅動函式用 err 真假值判斷、無法處理假值錯誤原因的 bug
- 軟化 async/await 為生成器語法糖的說法,改為概念類比
- WeakMap key 補充 ES2023 非註冊 Symbol 的例外
- Number.EPSILON 補充僅適用於接近 1 量級數值的限制
- 修正跨檔案題目引用的錯誤標號(Q4→Q8)
- typeof 安全性限定於未宣告識別字,TDZ 內的 let/const 仍會拋錯
- 軟化 Object.prototype.toString.call 讀取「內部 [[Class]] 標記」的說法
- 修正箭頭函式 this 在 Node CommonJS 模組下實為 module.exports,非全域物件
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Retsomm
Retsomm merged commit dc3f7af into mainJul 28, 2026
2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Retsomm
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' 新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構 by Retsomm · Pull Request #27 · Retsomm/EasyLearn · GitHub
Skip to content

新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構 - #27

Merged
Retsomm merged 2 commits into
mainfrom
dev
Jul 28, 2026
Merged

新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構#27
Retsomm merged 2 commits into
mainfrom
dev

Conversation

@Retsomm

@RetsommRetsomm commented Jul 28, 2026

Copy link
Copy Markdown
Owner
  • ydkjs-sc(作用域和閉包)、ydkjs-tp(this和物件原型)、ydkjs-tg(類型和語法)、 ydkjs-ap(異步和性能)、ydkjs-ug(起步上路)、ydkjs-es6(ES6及更新版本) 六章題目全部完成,每題程式碼片段皆以 node 實測後才寫入,並通過 validate-questions.mjs/tsc/next build 驗證
  • 新增 packages/core 的 Topic 抽象(types.ts + data/topics.ts), 首頁單一書籍卡片點入後先看到章節列表,再進入關卡列表(web + mobile 同步)

Summary by CodeRabbit

  • New Features
    • Added topic-based learning navigation on web and mobile.
    • Grouped related chapters into topics, with topic icons and progress summaries.
    • Added topic detail screens listing chapters and completion progress.
    • Improved back navigation between topics, chapters, and levels.
    • Added extensive JavaScript practice content covering scope, types, async programming, ES6+, objects, prototypes, classes, and performance.

- ydkjs-sc(作用域和閉包)、ydkjs-tp(this和物件原型)、ydkjs-tg(類型和語法)、
ydkjs-ap(異步和性能)、ydkjs-ug(起步上路)、ydkjs-es6(ES6及更新版本)
六章題目全部完成,每題程式碼片段皆以 node 實測後才寫入,並通過
validate-questions.mjs/tsc/next build 驗證
- 新增 packages/core 的 Topic 抽象(types.ts + data/topics.ts),
首頁單一書籍卡片點入後先看到章節列表,再進入關卡列表(web + mobile 同步)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
easy-learnReadyReadyPreview, CommentJul 28, 2026 8:37am

@coderabbitai

coderabbitaiBot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in:18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 299a5851-63c2-47ee-9add-eb290f966719

📥 Commits

Reviewing files that changed from the base of the PR and between 947474c and 530790a.

📒 Files selected for processing (12)
  • packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json
  • packages/core/src/data/questions/ydkjs-ap-2-callbacks.json
  • packages/core/src/data/questions/ydkjs-ap-5-program-performance.json
  • packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json
  • packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json
  • packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json
  • packages/core/src/data/questions/ydkjs-es6-5-collections.json
  • packages/core/src/data/questions/ydkjs-es6-6-new-apis.json
  • packages/core/src/data/questions/ydkjs-sc-5-closures.json
  • packages/core/src/data/questions/ydkjs-tg-1-types.json
  • packages/core/src/data/questions/ydkjs-tg-3-native-functions.json
  • packages/core/src/data/questions/ydkjs-ug-3-series-overview.json
📝 Walkthrough

Walkthrough

Adds grouped topic data and topic chapter navigation to the web and mobile apps. The core package gains six YDKJS chapters and numerous structured question datasets covering scope, types, objects, asynchronous JavaScript, ES6, and introductory programming concepts.

Changes

Topic learning flow

Layer / File(s)Summary
Topic catalog and navigation
packages/core/src/data/topics.ts, packages/core/src/types.ts, apps/web/src/..., apps/mobile/...
Topics aggregate chapters, Home cards route grouped topics to TopicBooks, and chapter back-navigation preserves topic context.
Topic chapter screens
apps/web/screens/TopicBooks.tsx, apps/mobile/screens/TopicBooks.tsx
New screens display topic metadata, chapter cards, completion counts, percentages, and progress bars.
YDKJS content integration
packages/core/src/data/chapters.ts, packages/core/src/data/questions/*
Six YDKJS chapters and structured question sets with answers, explanations, code samples, and verification data are added.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
participant Home
participant TopicBooks
participant LevelList
participant Progress
Home->>TopicBooks: open grouped topic
TopicBooks->>Progress: read completed levels
TopicBooks->>LevelList: open selected chapter
LevelList->>TopicBooks: return for grouped chapter
Loading

Possibly related PRs

  • Retsomm/EasyLearn#11: Introduces the mobile Home navigation structure extended by this topic-based routing.
  • Retsomm/EasyLearn#14: Modifies the Home topic/chapter card rendering that this change further integrates with topic navigation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedTitle accurately summarizes the main changes: adding YDKJS practice questions and changing the home navigation to a book→chapter two-level structure.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json`:
- Around line 120-137: 修正題目 ydkjs-ap-1-q6 的選項 a 與
explanation,將「非阻塞」限定為瀏覽器/Node.js 提供的特定非同步 API(如計時器、網路請求),並明確保留同步程式碼、CPU 密集型
JavaScript 與同步 Node I/O 會占用事件迴圈;不要將非阻塞描述成 JavaScript 本身的普遍特性。
In `@packages/core/src/data/questions/ydkjs-ap-2-callbacks.json`:
- Line 36: Update the cache-hit condition in the getData examples to check cache
membership with hasOwnProperty rather than cached-value truthiness, preserving
cached 0, false, and empty-string values. Apply this at
packages/core/src/data/questions/ydkjs-ap-2-callbacks.json lines 36-36, 59-59,
and 82-82.
In `@packages/core/src/data/questions/ydkjs-ap-5-program-performance.json`:
- Around line 9-21: Revise the Web Worker explanations in
packages/core/src/data/questions/ydkjs-ap-5-program-performance.json at lines
9-21, 28-40, 47-59, and 116-128: retain that ordinary variables are isolated,
but clarify that SharedArrayBuffer with Atomics enables intentional shared
memory; describe postMessage/message as the normal, not exclusive, communication
mechanism; and distinguish structured cloning from transferable ownership for
ArrayBuffer, MessagePort, and ImageBitmap. Update the corresponding options,
answers, and explanations consistently.
In `@packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json`:
- Around line 120-132: Update the question’s option a and its explanation so
they no longer claim observables share a generator-based foundation: state that
iterable sequences and generator coroutines use generator mechanisms, while
observables use a separate closure/listener-based multi-value event pattern.
Preserve the distinction that all three address limitations of Promise, but
avoid describing them as one shared implementation or foundation.
In `@packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json`:
- Around line 93-110: 更新題目與解釋中對 TC39 階段的描述:明確指出 Stage 0 才是最早期階段,並將 Stage 4
描述為提案已定案、將納入正式規範,不要限定為「下一版」規範。同步檢查 prompt、選項 a、explanation 與
verify.manual,保留其餘關於早期提案風險的內容。
In `@packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json`:
- Around line 74-95: Update the run function’s step error handling to use an
explicit resume mode rather than the truthiness of err, so rejected Promises
with 0, false, empty string, null, or undefined invoke it.throw and reach the
generator’s catch block. Preserve it.next for successful resolutions and pass
the mode through both Promise callbacks.
- Around line 120-137: Update the explanation in question “ydkjs-es6-4-q6” to
describe async/await as a conceptual analogue to the generator-plus-driver
pattern, not literal generator syntax sugar. Clarify that async functions return
Promises and use native await suspension, whereas generators expose
next()/throw() and iterator objects; retain the comparison of their similar
control flow without claiming they are the same mechanism.
In `@packages/core/src/data/questions/ydkjs-es6-5-collections.json`:
- Around line 120-140: Update the WeakMap question’s topic and explanation to
state that keys may be objects or non-registered Symbols, while primitive
strings and numbers remain invalid. Preserve the existing string-key example,
answer, and verification output, and adjust only the descriptions that
incorrectly claim keys must always be objects.
In `@packages/core/src/data/questions/ydkjs-es6-6-new-apis.json`:
- Around line 120-140: Update the explanation for question “ydkjs-es6-6-q6” to
define Number.EPSILON as the gap between 1 and the next representable Number,
not a universal floating-point tolerance. Preserve the current example’s
false/true result, but state that larger magnitudes require a magnitude-aware or
domain-specific tolerance, using values such as 1000.1 + 1000.2 versus 2000.3 as
the boundary example.
In `@packages/core/src/data/questions/ydkjs-sc-5-closures.json`:
- Line 90: Update the explanation in the relevant YDKJS question entry to
replace the stale “jsa-2-q8” cross-reference with the correct dataset question
ID for the let-based solution, or remove the cross-reference if no matching
target exists. Preserve the rest of the explanation unchanged.
In `@packages/core/src/data/questions/ydkjs-tg-1-types.json`:
- Around line 127-136: Update the explanation for answer option “a” and the
corresponding “explanation” field to scope typeof’s no-throw safety specifically
to unresolvable or undeclared identifiers. Remove the claim that it is safe for
any input, and do not imply that let/const bindings in their temporal dead zone
are handled safely; preserve the existing null caveat and overall rationale.
In `@packages/core/src/data/questions/ydkjs-tg-3-native-functions.json`:
- Line 9: Update the topic text in the native-functions entry to avoid claiming
that Object.prototype.toString.call precisely determines types or reads an
internal [[Class]] marker. Reword it to describe the result as built-in tags, or
the tags returned for these values, while preserving the existing explanation’s
scope.
In `@packages/core/src/data/questions/ydkjs-ug-3-series-overview.json`:
- Line 13: Update the arrow-function example and its expected answer to describe
lexical this as the surrounding CommonJS module context (module.exports), not
the global object. Keep the regular method’s this behavior unchanged and ensure
the explanation reflects that this.name resolves to undefined from that binding.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5a4f6ed1-ae65-4dd9-a37b-2cd050668de5

📥 Commits

Reviewing files that changed from the base of the PR and between 79532aa and 947474c.

📒 Files selected for processing (47)
  • apps/mobile/app/(tabs)/index.tsx
  • apps/mobile/screens/Home.tsx
  • apps/mobile/screens/TopicBooks.tsx
  • apps/web/src/App.tsx
  • apps/web/src/screens/Home.tsx
  • apps/web/src/screens/TopicBooks.tsx
  • packages/core/src/data/chapters.ts
  • packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json
  • packages/core/src/data/questions/ydkjs-ap-2-callbacks.json
  • packages/core/src/data/questions/ydkjs-ap-3-promises.json
  • packages/core/src/data/questions/ydkjs-ap-4-generators.json
  • packages/core/src/data/questions/ydkjs-ap-5-program-performance.json
  • packages/core/src/data/questions/ydkjs-ap-6-benchmarking-tuning.json
  • packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json
  • packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json
  • packages/core/src/data/questions/ydkjs-es6-2-syntax.json
  • packages/core/src/data/questions/ydkjs-es6-3-code-organization.json
  • packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json
  • packages/core/src/data/questions/ydkjs-es6-5-collections.json
  • packages/core/src/data/questions/ydkjs-es6-6-new-apis.json
  • packages/core/src/data/questions/ydkjs-es6-7-metaprogramming.json
  • packages/core/src/data/questions/ydkjs-es6-8-beyond-es6.json
  • packages/core/src/data/questions/ydkjs-sc-1-what-is-scope.json
  • packages/core/src/data/questions/ydkjs-sc-2-lexical-scope.json
  • packages/core/src/data/questions/ydkjs-sc-3-function-block-scope.json
  • packages/core/src/data/questions/ydkjs-sc-4-hoisting.json
  • packages/core/src/data/questions/ydkjs-sc-5-closures.json
  • packages/core/src/data/questions/ydkjs-sc-6-dynamic-scope.json
  • packages/core/src/data/questions/ydkjs-sc-7-block-scope-alternatives.json
  • packages/core/src/data/questions/ydkjs-tg-1-types.json
  • packages/core/src/data/questions/ydkjs-tg-2-values.json
  • packages/core/src/data/questions/ydkjs-tg-3-native-functions.json
  • packages/core/src/data/questions/ydkjs-tg-4-coercion.json
  • packages/core/src/data/questions/ydkjs-tg-5-syntax.json
  • packages/core/src/data/questions/ydkjs-tp-1-about-this.json
  • packages/core/src/data/questions/ydkjs-tp-2-this-all-explained.json
  • packages/core/src/data/questions/ydkjs-tp-3-objects.json
  • packages/core/src/data/questions/ydkjs-tp-4-mixing-objects-classes.json
  • packages/core/src/data/questions/ydkjs-tp-5-prototypes.json
  • packages/core/src/data/questions/ydkjs-tp-6-behavior-delegation.json
  • packages/core/src/data/questions/ydkjs-tp-7-es6-class.json
  • packages/core/src/data/questions/ydkjs-ug-1-into-programming.json
  • packages/core/src/data/questions/ydkjs-ug-2-into-javascript.json
  • packages/core/src/data/questions/ydkjs-ug-3-series-overview.json
  • packages/core/src/data/topics.ts
  • packages/core/src/index.ts
  • packages/core/src/types.ts

Comment threadpackages/core/src/data/questions/ydkjs-ap-2-callbacks.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-ap-5-program-performance.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-ap-7-advanced-async.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-es6-6-new-apis.json
Comment threadpackages/core/src/data/questions/ydkjs-sc-5-closures.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-tg-1-types.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-tg-3-native-functions.json Outdated
- 非阻塞限定為特定瀏覽器/Node API,同步/CPU密集程式碼仍會阻塞
- 快取查詢改用 hasOwnProperty,避免誤判假值(0/false/'')為未命中
- Web Worker:補充 SharedArrayBuffer+Atomics 例外、postMessage 標準管道措辭、structured clone 與 transferable object 的差異
- 修正 observable 誤植為建立在生成器機制上的說法
- 修正 TC39 Stage 1 誤標為最早期階段(應為 Stage 0)
- 修正生成器驅動函式用 err 真假值判斷、無法處理假值錯誤原因的 bug
- 軟化 async/await 為生成器語法糖的說法,改為概念類比
- WeakMap key 補充 ES2023 非註冊 Symbol 的例外
- Number.EPSILON 補充僅適用於接近 1 量級數值的限制
- 修正跨檔案題目引用的錯誤標號(Q4→Q8)
- typeof 安全性限定於未宣告識別字,TDZ 內的 let/const 仍會拋錯
- 軟化 Object.prototype.toString.call 讀取「內部 [[Class]] 標記」的說法
- 修正箭頭函式 this 在 Node CommonJS 模組下實為 module.exports,非全域物件
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Retsomm
Retsomm merged commit dc3f7af into mainJul 28, 2026
2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Retsomm
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); 新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構 by Retsomm · Pull Request #27 · Retsomm/EasyLearn · GitHub
Skip to content

新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構 - #27

Merged
Retsomm merged 2 commits into
mainfrom
dev
Jul 28, 2026
Merged

新增「你不知道的JavaScript」全 6 章練習題(37 關,約 222 題),並將首頁改為「書>章」兩層結構#27
Retsomm merged 2 commits into
mainfrom
dev

Conversation

@Retsomm

@RetsommRetsomm commented Jul 28, 2026

Copy link
Copy Markdown
Owner
  • ydkjs-sc(作用域和閉包)、ydkjs-tp(this和物件原型)、ydkjs-tg(類型和語法)、 ydkjs-ap(異步和性能)、ydkjs-ug(起步上路)、ydkjs-es6(ES6及更新版本) 六章題目全部完成,每題程式碼片段皆以 node 實測後才寫入,並通過 validate-questions.mjs/tsc/next build 驗證
  • 新增 packages/core 的 Topic 抽象(types.ts + data/topics.ts), 首頁單一書籍卡片點入後先看到章節列表,再進入關卡列表(web + mobile 同步)

Summary by CodeRabbit

  • New Features
    • Added topic-based learning navigation on web and mobile.
    • Grouped related chapters into topics, with topic icons and progress summaries.
    • Added topic detail screens listing chapters and completion progress.
    • Improved back navigation between topics, chapters, and levels.
    • Added extensive JavaScript practice content covering scope, types, async programming, ES6+, objects, prototypes, classes, and performance.

- ydkjs-sc(作用域和閉包)、ydkjs-tp(this和物件原型)、ydkjs-tg(類型和語法)、
ydkjs-ap(異步和性能)、ydkjs-ug(起步上路)、ydkjs-es6(ES6及更新版本)
六章題目全部完成,每題程式碼片段皆以 node 實測後才寫入,並通過
validate-questions.mjs/tsc/next build 驗證
- 新增 packages/core 的 Topic 抽象(types.ts + data/topics.ts),
首頁單一書籍卡片點入後先看到章節列表,再進入關卡列表(web + mobile 同步)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
easy-learnReadyReadyPreview, CommentJul 28, 2026 8:37am

@coderabbitai

coderabbitaiBot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Retsomm, you've reached your PR review limit, so we couldn't start this review.

Next review available in:18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 299a5851-63c2-47ee-9add-eb290f966719

📥 Commits

Reviewing files that changed from the base of the PR and between 947474c and 530790a.

📒 Files selected for processing (12)
  • packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json
  • packages/core/src/data/questions/ydkjs-ap-2-callbacks.json
  • packages/core/src/data/questions/ydkjs-ap-5-program-performance.json
  • packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json
  • packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json
  • packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json
  • packages/core/src/data/questions/ydkjs-es6-5-collections.json
  • packages/core/src/data/questions/ydkjs-es6-6-new-apis.json
  • packages/core/src/data/questions/ydkjs-sc-5-closures.json
  • packages/core/src/data/questions/ydkjs-tg-1-types.json
  • packages/core/src/data/questions/ydkjs-tg-3-native-functions.json
  • packages/core/src/data/questions/ydkjs-ug-3-series-overview.json
📝 Walkthrough

Walkthrough

Adds grouped topic data and topic chapter navigation to the web and mobile apps. The core package gains six YDKJS chapters and numerous structured question datasets covering scope, types, objects, asynchronous JavaScript, ES6, and introductory programming concepts.

Changes

Topic learning flow

Layer / File(s)Summary
Topic catalog and navigation
packages/core/src/data/topics.ts, packages/core/src/types.ts, apps/web/src/..., apps/mobile/...
Topics aggregate chapters, Home cards route grouped topics to TopicBooks, and chapter back-navigation preserves topic context.
Topic chapter screens
apps/web/screens/TopicBooks.tsx, apps/mobile/screens/TopicBooks.tsx
New screens display topic metadata, chapter cards, completion counts, percentages, and progress bars.
YDKJS content integration
packages/core/src/data/chapters.ts, packages/core/src/data/questions/*
Six YDKJS chapters and structured question sets with answers, explanations, code samples, and verification data are added.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
participant Home
participant TopicBooks
participant LevelList
participant Progress
Home->>TopicBooks: open grouped topic
TopicBooks->>Progress: read completed levels
TopicBooks->>LevelList: open selected chapter
LevelList->>TopicBooks: return for grouped chapter
Loading

Possibly related PRs

  • Retsomm/EasyLearn#11: Introduces the mobile Home navigation structure extended by this topic-based routing.
  • Retsomm/EasyLearn#14: Modifies the Home topic/chapter card rendering that this change further integrates with topic navigation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedTitle accurately summarizes the main changes: adding YDKJS practice questions and changing the home navigation to a book→chapter two-level structure.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json`:
- Around line 120-137: 修正題目 ydkjs-ap-1-q6 的選項 a 與
explanation,將「非阻塞」限定為瀏覽器/Node.js 提供的特定非同步 API(如計時器、網路請求),並明確保留同步程式碼、CPU 密集型
JavaScript 與同步 Node I/O 會占用事件迴圈;不要將非阻塞描述成 JavaScript 本身的普遍特性。
In `@packages/core/src/data/questions/ydkjs-ap-2-callbacks.json`:
- Line 36: Update the cache-hit condition in the getData examples to check cache
membership with hasOwnProperty rather than cached-value truthiness, preserving
cached 0, false, and empty-string values. Apply this at
packages/core/src/data/questions/ydkjs-ap-2-callbacks.json lines 36-36, 59-59,
and 82-82.
In `@packages/core/src/data/questions/ydkjs-ap-5-program-performance.json`:
- Around line 9-21: Revise the Web Worker explanations in
packages/core/src/data/questions/ydkjs-ap-5-program-performance.json at lines
9-21, 28-40, 47-59, and 116-128: retain that ordinary variables are isolated,
but clarify that SharedArrayBuffer with Atomics enables intentional shared
memory; describe postMessage/message as the normal, not exclusive, communication
mechanism; and distinguish structured cloning from transferable ownership for
ArrayBuffer, MessagePort, and ImageBitmap. Update the corresponding options,
answers, and explanations consistently.
In `@packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json`:
- Around line 120-132: Update the question’s option a and its explanation so
they no longer claim observables share a generator-based foundation: state that
iterable sequences and generator coroutines use generator mechanisms, while
observables use a separate closure/listener-based multi-value event pattern.
Preserve the distinction that all three address limitations of Promise, but
avoid describing them as one shared implementation or foundation.
In `@packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json`:
- Around line 93-110: 更新題目與解釋中對 TC39 階段的描述:明確指出 Stage 0 才是最早期階段,並將 Stage 4
描述為提案已定案、將納入正式規範,不要限定為「下一版」規範。同步檢查 prompt、選項 a、explanation 與
verify.manual,保留其餘關於早期提案風險的內容。
In `@packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json`:
- Around line 74-95: Update the run function’s step error handling to use an
explicit resume mode rather than the truthiness of err, so rejected Promises
with 0, false, empty string, null, or undefined invoke it.throw and reach the
generator’s catch block. Preserve it.next for successful resolutions and pass
the mode through both Promise callbacks.
- Around line 120-137: Update the explanation in question “ydkjs-es6-4-q6” to
describe async/await as a conceptual analogue to the generator-plus-driver
pattern, not literal generator syntax sugar. Clarify that async functions return
Promises and use native await suspension, whereas generators expose
next()/throw() and iterator objects; retain the comparison of their similar
control flow without claiming they are the same mechanism.
In `@packages/core/src/data/questions/ydkjs-es6-5-collections.json`:
- Around line 120-140: Update the WeakMap question’s topic and explanation to
state that keys may be objects or non-registered Symbols, while primitive
strings and numbers remain invalid. Preserve the existing string-key example,
answer, and verification output, and adjust only the descriptions that
incorrectly claim keys must always be objects.
In `@packages/core/src/data/questions/ydkjs-es6-6-new-apis.json`:
- Around line 120-140: Update the explanation for question “ydkjs-es6-6-q6” to
define Number.EPSILON as the gap between 1 and the next representable Number,
not a universal floating-point tolerance. Preserve the current example’s
false/true result, but state that larger magnitudes require a magnitude-aware or
domain-specific tolerance, using values such as 1000.1 + 1000.2 versus 2000.3 as
the boundary example.
In `@packages/core/src/data/questions/ydkjs-sc-5-closures.json`:
- Line 90: Update the explanation in the relevant YDKJS question entry to
replace the stale “jsa-2-q8” cross-reference with the correct dataset question
ID for the let-based solution, or remove the cross-reference if no matching
target exists. Preserve the rest of the explanation unchanged.
In `@packages/core/src/data/questions/ydkjs-tg-1-types.json`:
- Around line 127-136: Update the explanation for answer option “a” and the
corresponding “explanation” field to scope typeof’s no-throw safety specifically
to unresolvable or undeclared identifiers. Remove the claim that it is safe for
any input, and do not imply that let/const bindings in their temporal dead zone
are handled safely; preserve the existing null caveat and overall rationale.
In `@packages/core/src/data/questions/ydkjs-tg-3-native-functions.json`:
- Line 9: Update the topic text in the native-functions entry to avoid claiming
that Object.prototype.toString.call precisely determines types or reads an
internal [[Class]] marker. Reword it to describe the result as built-in tags, or
the tags returned for these values, while preserving the existing explanation’s
scope.
In `@packages/core/src/data/questions/ydkjs-ug-3-series-overview.json`:
- Line 13: Update the arrow-function example and its expected answer to describe
lexical this as the surrounding CommonJS module context (module.exports), not
the global object. Keep the regular method’s this behavior unchanged and ensure
the explanation reflects that this.name resolves to undefined from that binding.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5a4f6ed1-ae65-4dd9-a37b-2cd050668de5

📥 Commits

Reviewing files that changed from the base of the PR and between 79532aa and 947474c.

📒 Files selected for processing (47)
  • apps/mobile/app/(tabs)/index.tsx
  • apps/mobile/screens/Home.tsx
  • apps/mobile/screens/TopicBooks.tsx
  • apps/web/src/App.tsx
  • apps/web/src/screens/Home.tsx
  • apps/web/src/screens/TopicBooks.tsx
  • packages/core/src/data/chapters.ts
  • packages/core/src/data/questions/ydkjs-ap-1-async-now-and-later.json
  • packages/core/src/data/questions/ydkjs-ap-2-callbacks.json
  • packages/core/src/data/questions/ydkjs-ap-3-promises.json
  • packages/core/src/data/questions/ydkjs-ap-4-generators.json
  • packages/core/src/data/questions/ydkjs-ap-5-program-performance.json
  • packages/core/src/data/questions/ydkjs-ap-6-benchmarking-tuning.json
  • packages/core/src/data/questions/ydkjs-ap-7-advanced-async.json
  • packages/core/src/data/questions/ydkjs-es6-1-now-and-future.json
  • packages/core/src/data/questions/ydkjs-es6-2-syntax.json
  • packages/core/src/data/questions/ydkjs-es6-3-code-organization.json
  • packages/core/src/data/questions/ydkjs-es6-4-async-flow-control.json
  • packages/core/src/data/questions/ydkjs-es6-5-collections.json
  • packages/core/src/data/questions/ydkjs-es6-6-new-apis.json
  • packages/core/src/data/questions/ydkjs-es6-7-metaprogramming.json
  • packages/core/src/data/questions/ydkjs-es6-8-beyond-es6.json
  • packages/core/src/data/questions/ydkjs-sc-1-what-is-scope.json
  • packages/core/src/data/questions/ydkjs-sc-2-lexical-scope.json
  • packages/core/src/data/questions/ydkjs-sc-3-function-block-scope.json
  • packages/core/src/data/questions/ydkjs-sc-4-hoisting.json
  • packages/core/src/data/questions/ydkjs-sc-5-closures.json
  • packages/core/src/data/questions/ydkjs-sc-6-dynamic-scope.json
  • packages/core/src/data/questions/ydkjs-sc-7-block-scope-alternatives.json
  • packages/core/src/data/questions/ydkjs-tg-1-types.json
  • packages/core/src/data/questions/ydkjs-tg-2-values.json
  • packages/core/src/data/questions/ydkjs-tg-3-native-functions.json
  • packages/core/src/data/questions/ydkjs-tg-4-coercion.json
  • packages/core/src/data/questions/ydkjs-tg-5-syntax.json
  • packages/core/src/data/questions/ydkjs-tp-1-about-this.json
  • packages/core/src/data/questions/ydkjs-tp-2-this-all-explained.json
  • packages/core/src/data/questions/ydkjs-tp-3-objects.json
  • packages/core/src/data/questions/ydkjs-tp-4-mixing-objects-classes.json
  • packages/core/src/data/questions/ydkjs-tp-5-prototypes.json
  • packages/core/src/data/questions/ydkjs-tp-6-behavior-delegation.json
  • packages/core/src/data/questions/ydkjs-tp-7-es6-class.json
  • packages/core/src/data/questions/ydkjs-ug-1-into-programming.json
  • packages/core/src/data/questions/ydkjs-ug-2-into-javascript.json
  • packages/core/src/data/questions/ydkjs-ug-3-series-overview.json
  • packages/core/src/data/topics.ts
  • packages/core/src/index.ts
  • packages/core/src/types.ts

Comment threadpackages/core/src/data/questions/ydkjs-ap-2-callbacks.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-ap-5-program-performance.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-ap-7-advanced-async.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-es6-6-new-apis.json
Comment threadpackages/core/src/data/questions/ydkjs-sc-5-closures.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-tg-1-types.json Outdated
Comment threadpackages/core/src/data/questions/ydkjs-tg-3-native-functions.json Outdated
- 非阻塞限定為特定瀏覽器/Node API,同步/CPU密集程式碼仍會阻塞
- 快取查詢改用 hasOwnProperty,避免誤判假值(0/false/'')為未命中
- Web Worker:補充 SharedArrayBuffer+Atomics 例外、postMessage 標準管道措辭、structured clone 與 transferable object 的差異
- 修正 observable 誤植為建立在生成器機制上的說法
- 修正 TC39 Stage 1 誤標為最早期階段(應為 Stage 0)
- 修正生成器驅動函式用 err 真假值判斷、無法處理假值錯誤原因的 bug
- 軟化 async/await 為生成器語法糖的說法,改為概念類比
- WeakMap key 補充 ES2023 非註冊 Symbol 的例外
- Number.EPSILON 補充僅適用於接近 1 量級數值的限制
- 修正跨檔案題目引用的錯誤標號(Q4→Q8)
- typeof 安全性限定於未宣告識別字,TDZ 內的 let/const 仍會拋錯
- 軟化 Object.prototype.toString.call 讀取「內部 [[Class]] 標記」的說法
- 修正箭頭函式 this 在 Node CommonJS 模組下實為 module.exports,非全域物件
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Retsomm
Retsomm merged commit dc3f7af into mainJul 28, 2026
2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@Retsomm