J6: For and while loops