Skip to main content

Practice ยท 3 of 3

Dynamic Row Manager

Write createRowManager() that RETURNS an object managing rows ({ id, label }): - add(label) โ€” appends a row with a unique **increasing** id starting at 1 and returns the id - remove(id) โ€” removes that row; returns true if it existed, false otherwise - list() โ€” returns the rows in insertion order - move(id, toIndex) โ€” moves the row to toIndex in the list; returns true on success, false when the id is unknown or toIndex is out of range

Difficulty: intermediate

Back to lesson: Practice: Advanced Forms โ€” Practice