Exercise 2: Confirming the Breadcrumb Order — Possible Solution ==================================================================== SETUP ------------------------------ Three real rows in the pages table: id: 1, title: 'Programming', parent_id: NULL id: 2, title: 'General-Purpose Languages', parent_id: 1 id: 3, title: 'Java', parent_id: 2 CALLING getBreadcrumb(pool, 3) ------------------------------ The while loop starts at currentId = 3, unshifts the Java row, moves to parent_id (2), unshifts the General-Purpose Languages row at the front, moves to parent_id (1), unshifts the Programming row at the front, then stops since Programming's own parent_id is NULL. RESULT ------------------------------ [Programming, General-Purpose Languages, Java] - the root ancestor first, the page itself last, the correct order for rendering a breadcrumb nav 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.