Question · Vibe coding with Claude Code course · Module 4: Instagram clone

Quiz: Next Photo in the Window

How do you compute the index of the next photo in the window so that after the last one it goes back to the first?

Answer options

  • index + 1
  • photos.length - 1
  • (index - 1) % photos.length
  • (index + 1) % photos.length

You can check the correct answer by solving this task in the CodeWorlds game.