Exercise 2: Confirming the Breadcrumb Order — Possible Solution ==================================================================== SETUP ------------------------------ Three real rows in the pages table: id: 1, title: 'Programming', parentId: null id: 2, title: 'General-Purpose Languages', parentId: 1 id: 3, title: 'Java', parentId: 2 CALLING getBreadcrumb(3) ------------------------------ The while loop starts at currentId = 3, unshifts the Java row, then moves to its parentId (2), unshifts the General-Purpose Languages row at the front, then moves to its parentId (1), unshifts the Programming row at the front, then stops since Programming's own parentId is null. RESULT ------------------------------ [Programming, General-Purpose Languages, Java] - the root ancestor first, the page itself last, exactly the order a real breadcrumb nav needs to render left to right. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly traces the while loop's own repeated unshift calls across three real levels, and correctly shows the resulting array lands in root-to-leaf order rather than leaf-to-root.