Use an array:
var marker = [];
for (i=0; i < location.length; i++) {
marker[counter] = new google.maps.Marker({
More Related Contents:
- how to make code valid without && operator?
- Discord bot simple editing its own message gives me error
- How to get 100% ADA compliance result in accessibility checker website https://webaccessibility.com? [closed]
- Npm Package Install Problem (found 23 vulnerabilities)
- What is the use of the JavaScript ‘bind’ method?
- Javascript equivalent of Python’s zip function
- When does reflow happen in a DOM environment?
- How to disable text selection using jQuery?
- Calling javascript function in iframe
- ES6 template literals vs. concatenated strings
- Displaying a number in Indian format using Javascript
- How to store a javascript function in JSON
- Accessing JSON object keys having spaces [duplicate]
- How can I make the browser wait to display the page until it’s fully loaded?
- Event listener for when element becomes visible?
- execCommand() is now obsolete, what’s the alternative?
- jQuery Selector + SVG Incompatible?
- Recommended Vim plugins for JavaScript coding? [closed]
- Chrome sets cursor to text while dragging, why?
- Calculating the difference between two dates
- Nested JSON objects – do I have to use arrays for everything?
- How to use JavaScript to fill a form on another page
- Dynamically Scrolling a Textarea
- JS Object this.method() breaks via jQuery
- Is jquery a javascript library or framework? [closed]
- How to count the correct length of a string with emojis in javascript?
- Using page’s angular JS in chrome extension
- Run jQuery code after AngularJS completes rendering HTML
- How to login into a website with CasperJS?
- Regex that matches anything except for all whitespace