0

Is it possible to include if statements like this inside a js function paramter? What would the syntax look like?

let marker = new google.maps.Marker({
        position: ,
        map: ,
        title: ,
        icon: {
            url: IF i <= 3 USE "http://maps.google.com/mapfiles/ms/icons/red-dot.png"
                 ELSE "http://maps.google.com/mapfiles/ms/icons/yellow-dot.png"
        }
      })
pp182
  • 107
  • 7

0 Answers0