Skip to main content
Participant
April 2, 2008
Question

Accessing variable in a loop

  • April 2, 2008
  • 1 reply
  • 303 views
cannot access this variable from outside the loop. I know it has to be something very simple. When tracing the variable, it comes back as undefined. Please help.. Thanks
This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
April 3, 2008
when you prefix a variable with var, you make it local to the function that contains the variable.