Practice on creating JS loops