Julius Caesar's great-great-granddaughter (zyada) wrote in javascript,
Julius Caesar's great-great-granddaughter
zyada
javascript

Help with variable scope?

I have a variable that I want to retain its value between function calls. The page is here: http://zyada-stuff.com/SpreadingRoots/temp.html

The function is an event listener, and the variable is map_marker0. If I could get the variable to retain its value between calls, line #45 would erase the marker so that it could be reset to a new spot. Right now, the page just creates a new marker.
  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

  • 4 comments