js loop practice