title: Insert a variable into another variable Javascript
body: <p>My code looks like this:</p>
  
  <p>ORIGINAL</p>
  
  <pre><code>var key_word = {'dentists'};
  
  var pageOptions = { 
    'query': 'cars',
    'hl': 'en'
  };
  </code></pre>
  
  <p>I want to insert the variable 'key_word' into where it says cars:</p>
  
  <p>NEW CODE - entire code</p>
  
  <pre><code>&lt;div id="adcontainer1"&gt;&lt;/div&gt;
  &lt;script src="http://www.google.com/adsense/search/ads.js" type="text/javascript"&gt;&lt;/script&gt; 
  &lt;script type="text/javascript" charset="utf-8"&gt; 
  var key_word = "dentists";
  
  var pageOptions = { 
    'pubId': 'pub-999999999999999',
    'query': function(){ return key_word; },
    'hl': 'en'
  };
  
  var adblock1 = { 
    'container': 'adcontainer1',
    'number': '1',
    'width': '700px',
    'lines': '1',
    'colorBackground': 'FBFFDB'
  };
  
  new google.ads.search.Ads(pageOptions, adblock1);
  &lt;/script&gt;
  </code></pre>
  
  <p>From the resulting ad, it appears dentists is not being passed correctly.  Instead the ad is running the text 'key word' instead of the variable key_word, which is the text 'dentists'.  Do I have a syntax problem here?</p>