title: How do I get all values from an Array that are less than 100?
body: <p>Given an object and a key, I am creating a function that returns an array containing all the elements of the array located at the given key that are less than 100. Basically, If the array is empty, it should return an empty array. If the array contains no elements less than 100, it should return an empty array.
  If the property at the given key is not an array, it should return an empty array.
  If there is no property at the key, it should return an empty array.</p>
  
  <p>Here are my codes so far:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function getElementsLessThan100AtProperty(obj, key) {
    if (obj.key &lt; 100) {
      return obj.key;
    }
  }
  
  var obj = {
    key: [1000, 20, 50, 500]
  };
  var output = getElementsLessThan100AtProperty(obj, 'key');
  console.log(output); // --&gt; MUST RETURN [20, 50]</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any idea what am I missing?</p>