title: From Object to Array in JavaScript
body: <p>I need to write a function that takes in an object and returns an array with this object's property values. </p>
  
  <p>Ex.:</p>
  
  <pre><code>var obj = {
      name: "Joao",
      age: 27,
      country: "USA"
  };
  </code></pre>
  
  <p>The function should return an array like this:</p>
  
  <pre><code>var array = ["John", 27, "USA"]; 
  </code></pre>
  
  <p>I can't use Object.values().</p>
  
  <p>That's how my last attempt looks like:</p>
  
  <pre><code>function returnValues(obj) {
      for (var key in obj) {
      return obj[key];
  }
  </code></pre>
  
  <p>It does not return an array with the values. Can anyone help me? </p>