title: Do the <%= %> tags change the type of variable? Passed variables are not working inside my function
body: <p>I passed information from mongoDB using mongoose to my ejs file. From here I am trying to loop the data through a function called addMarker that pulls the data with a &lt;%= %> tag and adds it to a google map. </p>
  
  <p>I have tested the values by printing them and their "typeof" to the console and they show that they are correct (Number,number, string) and the correct value. So my assumption is either the way I am passing the values is invalid or the &lt;%= %> tags are changing the type of the variable. I have also tried using &lt;%- and &lt;% tags</p>
  
  <p>ejs</p>
  
  <pre><code>&lt;script&gt; 
          function initMap(){
              //Map Options to dictate zoom and position
              var options = {
                  zoom: 16, 
                  center: {lat:35.6543936, lng: -97.4714266}
              }
              //init map for view
              var map = new google.maps.Map(document.getElementById('map'), options);
  
              /*var marker = new google.maps.Marker({
                  position:{lat: 35.654243, lng: -97.472937 },
                  map: map,
                  title: 'Math And Computer Science'
              });*/
  
              //addMarker({coords:{lat:35.6543936, lng: -97.4714266}, title: "TestCase"});
              //addMarker({coords:{lat:35, lng: -97}, title: "TestCase2"});
  
              &lt;% for (const location of results) { %&gt;
                 addMarker({coords:{lat: &lt;%=location.lat %&gt;, lng: &lt;%=location.lng%&gt; }, title: &lt;%=location.title%&gt; } );
                 &lt;%= console.log(location.lat) %&gt;
                 &lt;%= console.log(typeof location.lat) %&gt;
                 &lt;%= console.log( location.title) %&gt;
              &lt;% } %&gt;
  
  
              //Add Marker Function
              function addMarker(props){
                  var marker = new google.maps.Marker({
                      position: props.coords,
                      map:map,
                      title: props.title
                  })
              }
          }
  &lt;/script&gt;
  </code></pre>
  
  <p>So I have commented out tests of addMarker:</p>
  
  <pre><code>            //addMarker({coords:{lat:35.6543936, lng: -97.4714266}, title: "TestCase"});
              //addMarker({coords:{lat:35, lng: -97}, title: "TestCase2"});
  </code></pre>
  
  <p>that both work as intended. When I run addMarker in my loop the map shows up but no markers are displayed on the map.</p>