When are targets picked for spells with multiple “missiles”?


For spells like Magic Missile and Scorching Ray that involve multiple ranged attacks, when do you pick targets for each ray/missle?

Do you pick them all up front and then roll attack/damage? Or do you pick one, roll attack/damage, and repeat?