Literary Terms - Foreshadowing

Be a warning or indication of (a future event).

This is like when tv shows go into the future and show what happened and go back to the past for the events that lead up to it.