title: Why doesn't my function list all the properties of an Array but does on ob?
body: <p>Here is the code. My function doesn't work on the object <code>Array</code> but does on my object <code>ob</code> defined with an object literal. </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 all_properties(object) {
   var value = "[";
   for (var prop in object) {
    
     value += '"' + prop + '"' + ","
   }
   value = value.slice(0,-1);
   value += "]";
   return value;
  }
  
  var ob = {first: 1, second: function () {}, third: function () {}}
  console.log(all_properties(ob))
  console.log(all_properties(Array))</code></pre>
  </div>
  </div>
  </p>