Practice ยท 3 of 3
Modal Focus Plan
CHALLENGE
Difficulty: intermediate+25 XP
Write focusPlan({ focusables, currentIndex }) returning the NEXT index when Tab is pressed forward and the PREVIOUS when Shift+Tab ({ forward } is boolean). Wrap around at both ends. Also return restoreTo โ always the value passed as restoreIndex (the opener) in the result object.
Press Submit to check your solution.
Back to lesson: Practice: Component Systems โ Practice