Exercise 2: Confirming JavaScript's String Behavior — Possible Solution ==================================================================== NODE REPL SESSION ------------------------------ > '水のページ'.length 5 > '水のページ'.slice(0, 3) '水のペ' WHAT THIS CONFIRMS ------------------------------ Per this chapter, JavaScript strings are UTF-16 code unit sequences, and common kanji characters like 水 fall within the Basic Multilingual Plane, each represented as exactly one UTF-16 code unit. This means .length correctly reports 5 (five real characters, not a byte count), and .slice(0, 3) correctly cuts at a real character boundary rather than corrupting a multi-unit character mid-way through. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly demonstrates real JavaScript string behavior on a kanji-containing string, confirming the chapter's own claim that Astro inherits the exact same safe string model Next.js already relied on, with no new risk introduced.