Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3975190
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:39:19+00:00 2026-05-20T04:39:19+00:00

Are arrays merely objects in disguise? Why/why not? In what way(s) are they (such/not)?

  • 0

Are arrays merely objects in disguise? Why/why not? In what way(s) are they (such/not)?

I have always thought of arrays and objects in JS as essentially the same, primarily because accessing them is identical.

var obj = {'I': 'me'};
var arr = new Array();
arr['you'] = 'them';

console.log(obj.I);
console.log(arr.you);
console.log(obj['I']);
console.log(arr['you']);

Am I mislead/mistaken/wrong? What do I need to know about JS literals, primitives, and strings/objects/arrays/etc…?

Are arrays/objects merely strings in disguise? Why/why not? In what way(s) are they (such/not)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:39:20+00:00Added an answer on May 20, 2026 at 4:39 am

    Arrays are objects.

    However, unlike regular objects, arrays have certain special features.

    1. Arrays have an additional object in their prototype chain – namely Array.prototype. This object contains so-called Array methods which can be called on array instances. (List of methods is here: http://es5.github.io/#x15.4.4)

    2. Arrays have a length property (which is live, ergo, it auto-updates) (Read here: http://es5.github.io/#x15.4.5.2)

    3. Arrays have a special algorithm regarding defining new properties (Read here: http://es5.github.io/#x15.4.5.1). If you set a new property to an array and that property’s name is a sting which can be coerced to an integer number (like '1', '2', '3', etc.) then the special algorithm applies (it is defined on p. 123 in the spec)

    Other than these 3 things, arrays are just like regular objects.

    Read about arrays in the spec: http://es5.github.io/#x15.4

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have objects such as these: class Log { public matches; public function __construct()
Two arrays containing objects, is not returning intersect when using '&' between the arrays.
I am trying to merge two arrays of objects in ruby. The objects have
Arrays have a "length" property by default. Can I add custom properties to them?
I have about 50 arrays filled with numbers and I have to report out
Hello i have 2 arrays and and i want to put them in a
I have three arrays and I have copied all these arrays into a single
I have two arrays, @names and @employees , that are filled with strings that
I have 4 string arrays,each of these array's length is 4. I also have
I have multiple arrays with string values and I want to compare them and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.