Arrays
Array Index Reassignment
Array Index Reassignment
Array indexes read and write positions in an ordered list. When you assign to an existing index, the array keeps the same length but the value at that position changes.
This matters in interfaces that keep a list of steps, tabs, or queued actions where one entry needs to be corrected without rebuilding the whole list.
Your task: Use array indexing to replace the draft step in workflow with the published step. Then store the changed second item in currentStep and log it.
Prerequisites
- variables
- strings
- arrays
Tests
- workflow keeps three items
- the second workflow item is updated
- currentStep stores the updated item
- the updated step is logged