Skip to main content

Practice · 2 of 2

Widget Layout Planner

CHALLENGE
Difficulty: intermediate+25 XP

Write planLayout(widgets, cols) distributing widgets (array of ids) into cols columns row-major (like CSS grid auto-placement): RETURN an array of cols arrays. place(widgets, cols, index) additionally returns the row/column of the widget at index as { row, col } (both 0-based).

Back to lesson: Practice: Mini Build: Themeable Dashboard Core