Skip to main content

Practice ยท 1 of 2

State-to-DOM Renderer

Write renderTasks(state) that returns an HTML STRING (never touches the DOM directly): tasks ordered by done ascending then priority weight high=3, medium=2, low=1, each rendered as <li data-id="ID" class="done?">TITLE</li> โ€” class "done" only when done is true. Plus nextId(state) returning the next numeric id as a string.

Difficulty: advanced

Back to lesson: Practice: Dashboard Mini-Build