Objects to Array : <p>I need to push keys of obj into the array, what is wrong with my code:</p>

<pre><code>function getAllKeys(obj) {
  var arr = [];
  var sample = {
  name : 'Sam',
  age : 25,
  hasPets : true
}
  for(var key in obj){
    arr.push(obj[key])
  }
  return arr;
}
getAllKeys()
</code></pre>
