Why does the array returned from Object.keys() !=== an array with the same strings?

Why does the array returned from Object.keys() !=== an array with the same strings?
0.0 0

#1

/* Here’s my code: */

const newOb  = {
    name: 'bob',
    field: 'spelunking,
    id: '34054'
}

const newAr = [ 'name', 'field', 'id' ]

Object.keys(newOb) === newAr

/* it returns false. Why? */


#2

You can’t compare the contents of two arrays with the equality operator. The array created by Object.keys is a different object than the array newAr, so it is false.


#3

Wait. So the array created by Object.keys is an object? Is it both an array and an object?


#4

All arrays are objects.


#5

Ok. So if you were to compare any two arrays with === it would return false. I see.

Thanks!