title: call attributes inside a function JavaScript
body: <p>I have script like this.</p>
  
  <pre><code>map.addMarker({
   lat: data[x]['lat'],
   lng: data[x]['lng'],
   icon: iconUsed,
   click: function() {
    alert(lat)
   },
   infoWindow: {
    content: popupMaps.join(''),
   });
  </code></pre>
  
  <p>is it possible to call 'lat' parameter inside addMarker() ?
  i mean, when i click the marker, it will alerting me the lat parameter itself.
  i dont know what is going wrong, if i use alert(data[x]['lat']) it will always show me the last increment number in 'x' looping.</p>
  
  <p>hope someone knows what i means
  sorry for my bad english</p>