How are arrays different from the data type objects?

is the Data types-object the same thing with the Objects in the fifth chapter (JavaScript: Arrays, Loops, and Objects)?

Objects of a given type will have a constructor and a prototype chain from which they inherit their methods. They are typed by the name of their constructor. (ES6 classes closely parallel this, but in class based constructor and methods)

typeof 'string'    // 'string'
typeof 42          // 'number'
typeof true        // 'boolean'
typeof []          // 'object'
Array.isArray([])  // true
 > (typeof '').constructor
<- ƒ String() { [native code] }

as i learnt in the fifth chapter (JavaScript: Arrays, Loops, and Objects) ,the code of Objects is something like this: const obj ={key: value} ,in your example
typeof return ‘object’

i think and {key: value} are totally different

does that mean typeof {} , typeof () will also return ‘object’?
and the type of an array is object?

typeof {}    // 'object'

Arrays are a special object whose keys are defined as a sequence that begins with zero and ascends by one up to a bound. which length describes.

Arrays can be enumerated such that the indexes become keys; and, the object preserves order. It never changes its order unless we re-order it by means of sort or other form of manipulation.

 > a = [3, 5, 8, 13]
<- (4) [3, 5, 8, 13]
 > a['3']
<- 13
2 Likes

thank you for your explanation , by the way, what is the symbol">" and " <-" mean in your example

1 Like

Those symbolize the console prompt and response, respectively.

 > direct input (command)
<- response

They have no meaning in a code sense.