title: javascript getProperty
body: <p>I'm a complete beginner trying to learn Javascript. I am trying to complete a problem requiring me to return a <em>value</em> assigned to a <em>key</em>. The function is called <em>getProperty</em> and I am stuck - it keeps returning &quot;should return the value of the property located in the object at the passed in key&quot; every time I attempt to run a test on the code.</p>
  <pre><code>    var obj = {key: 'value'};
  
      function getProperty(obj, key) {
          var o = obj.key;
          return(o);
      }
  
      console.log(getProperty);
  </code></pre>