title: Can I return a global variable from Function?
body: <ul>
  <li>Declare a global variable named aCar as an object with no properties.</li>
  <li>Declare a function named getTransmission that will return the transmission property of global variable named aCar</li>
  <li>Declare a function named getModel that will return the model property of global variable named aCar</li>
  </ul>
  <pre><code>&lt;script id=&quot;candidateCode&quot;&gt;
  
      var myCar =         
      {
      make : &quot;Honda&quot;
      ,model :&quot;Accord&quot;
      ,year: 2019
      ,transmission: &quot;Automatic&quot;
      }
  
      var aCar = {};      
  
      function getCar(aCar) {         
          return {year: 2020};
      }
  
      function addTransmission(aCar) {
          aCar.transmission =&quot;Automatic&quot;;
      }
  
      function addMakeModel(aCar) {
          aCar.make =&quot;Toyata&quot;;
          aCar.model =&quot;Civic&quot;;
      }
      
  
      function getTransmission(aCar) {
          return
      }
  
      function getModel(aCar) {
          
      }
  
  &lt;/script&gt;
  </code></pre>