How to Define a Variable Before a JavaScript for Loop: an Example