Declaring Variable for the JavaScript for Loop: an Example