title: Uncaught TypeError: Object.values is not a function JavaScript
body: <p>I have a simple object like the one below:</p>
  
  <pre><code>var countries = {
      "Argentina":1,
      "Canada":2,
      "Egypt":1,
  };
  </code></pre>
  
  <p>I need to create two arrays. The first array is an array of all the keys from the object. I created this array by: </p>
  
  <pre><code>var labels = Object.keys(countries);
  </code></pre>
  
  <p>This works well. I obtain an array of countries. Now when I try to create an array from the values...</p>
  
  <pre><code>var labels = Object.values(countries);
  </code></pre>
  
  <p>I get this error: <code>Uncaught TypeError: Object.values is not a function JavaScript</code></p>
  
  <p>I don't know what I am doing wrong. I <code>console.log countries</code> before and after I declare <code>labels</code> and the object remains the same. How do I properly use <code>Object.values()</code>?</p>