javascript loops homework done