Old Value Of Array Replace By New Value Of Array
I am trying to do is onclick of google map. Attempting to create array which contains address. The problem is when I alert the array it only displays the current value. I also trie
Solution 1:
I'm assuming this is present inside a function.
The problem with the code might be that waypts
is made a local variable.
If it is referred anywhere else, the value cannot be obtained.
The variable is reinitialized each time the function is called, so any previous values stored in the array will be lost.
Make waypts
global and try by defining the variable outside the function.
Post a Comment for "Old Value Of Array Replace By New Value Of Array"