Can any way explain how do and loop work and how they go together. Please also include some source for example! Thanks