Skip to main content

Practice ยท 2 of 2

Widget Layout Planner

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).

Difficulty: intermediate

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