var list = [
    { date: '12/1/2011', reading: 3, id: 20055 },
    { date: '13/1/2011', reading: 5, id: 20053 },
    { date: '14/1/2011', reading: 6, id: 45652 }
];

and then access it:

alert(list[1].date);
Answer from Darin Dimitrov on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Array
Array - JavaScript | MDN
2 days ago - The array's object properties and list of array elements are separate, and the array's traversal and mutation operations cannot be applied to these named properties. Array elements are object properties in the same way that toString is a property (to be specific, however, toString() is a method). Nevertheless, trying to access an element of an array as follows throws a syntax error because the property name is not valid: ... JavaScript ...
🌐
W3Schools
w3schools.com › js › js_arrays.asp
JavaScript Arrays
Key characteristics of JavaScript arrays are: Elements: An array is a list of values, known as elements. Ordered: Array elements are ordered based on their index. Zero indexed: The first element is at index 0, the second at index 1, and so on.
🌐
Mozilla
developer.mozilla.org › en-US › docs › Web › JavaScript › Guide › Indexed_collections
Indexed collections - JavaScript | MDN
An array is an ordered list of values that you refer to with a name and an index. For example, consider an array called emp, which contains employees' names indexed by their numerical employee number. So emp[0] would be employee number zero, emp[1] employee number one, and so on. JavaScript does ...
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-arrays
JavaScript Arrays - GeeksforGeeks
In JavaScript, an array is an ordered list of values.
Published   1 month ago
Find elsewhere
🌐
Substack
harendra21.substack.com › harendra’s substack › javascript list (js list) - everything you need to know about arrays in js
JavaScript List (JS List) - Everything You Need to Know About Arrays in JS
June 12, 2025 - In this article, the term “JavaScript list” or “JS list” refers to an array, which is an object type in JavaScript that manages ordered sets of data. The features of JavaScript, such as lists of user names, product items, or even a set ...
🌐
Medium
medium.com › @mandeepkaur1 › a-list-of-javascript-array-methods-145d09dd19a0
A List of JavaScript Array Methods | by Mandeep Kaur | Medium
February 28, 2020 - In JavaScript, an array is a data structure that contains list of elements which store multiple values in a single variable. The strength…
🌐
Listjs
listjs.com
Search, sort, filters, flexibility to tables, list and more! - List.js
List.js: native JavaScript that makes your plain HTML lists super flexible, searchable, sortable and filterable - https://t.co/nOoE1RJg— Smashing Magazine (@smashingmag) December 17, 2011 · Search, sort, and filter your #HTML tables, lists, and more with List.js https://t.co/4BHjmOEU56 – dev'd by @javve log'd by @jerodsanto #js— The Changelog (@TheChangelog) November 29, 2013 ·
🌐
JavaScript.info
javascript.info › tutorial › the javascript language › data types
Arrays
Arrays have their own implementation of toString method that returns a comma-separated list of elements. ... Arrays do not have Symbol.toPrimitive, neither a viable valueOf, they implement only toString conversion, so here [] becomes an empty string, [1] becomes "1" and [1,2] becomes "1,2". When the binary plus "+" operator adds something to a string, it converts it to a string as well, so the next step looks like this: alert( "" + 1 ); // "1" alert( "1" + 1 ); // "11" alert( "1,2" + 1 ); // "1,21" Arrays in JavaScript, unlike some other programming languages, shouldn’t be compared with operator ==.
🌐
OutSystems
outsystems.com › forums › discussion › 55986 › list-in-javascript
List in JavaScript | OutSystems
January 2, 2020 - I want to create list/array of objects in JavaScript and use this list as a output parameter of the same JavaScript in mobile app. How to achieve this · OutSystems does not allow you to define an output parameter of data type list
🌐
Quora
quora.com › Is-‘list’-and-‘array’-different-in-Javascript
Is ‘list’ and ‘array’ different in Javascript? - Quora
Answer (1 of 6): Yes, "list" and "array" are different data types in JavaScript. An array is a type of data structure that stores elements linearly, while a list is a data type that stores elements in a linked list format. While both data types can store multiple values, they each have their own ...
🌐
IRS
apps.irs.gov › app › eos
Tax Exempt Organization Search | Internal Revenue Service
For you and your family · Standard mileage and other information
🌐
W3Schools
w3schools.com › jsref › jsref_array_at.asp
JavaScript Array at() Method
This is not possible in JavaScript, because [] is used for accessing both arrays and objects.
🌐
freeCodeCamp
freecodecamp.org › news › javascript-array-handbook
JavaScript Array Handbook – Learn How JS Array Methods Work With Examples and Cheat Sheet
August 31, 2023 - In JavaScript, an array is implemented as an object that can have a group of items, elements, or values as an ordered collection. This means you can access an array's element using its position in the collection.
🌐
Reddit
reddit.com › r/learnjavascript › what can i do with lists (not arrays)?
r/learnjavascript on Reddit: What Can I Do With Lists (Not Arrays)?
January 6, 2025 -

I was a gifted a copy of Eloquent JavaScript for Christmas, and I came across a data structure that the author calls a list. The author defines a list as a "nested set of objects with the first object holding a reference to the second, the second to the third, and so on."

The book includes code:

let list = {
  value: 1,
  rest: {
    value: 2,
    rest: {
      value: 3,
      rest: null
}

When would you use this? The book says, "A nice thing about lists is that they can share parts of their structure." But if you can organize an object's structure however you like, you can choose to have them all use the same structure if you want. Does the book mean that they share content?

Even if that's what it means, can't you just include these subordinate objects into a master object to share data? Something like:

let masterList = {
  value1: 1,
  value2: 2,
  value3: 3,

  rest1: {},
  rest2: {}
}

Then rest1 and rest2 can share the values without interfering with each other or nesting.

Edit: the author expanded on this (linked) list by adding a way to iterate through the list. That seems to make it more useful:

Now I see a little better what people were saying as far as using this as an alternative to arrays. Still don't entirely understand when to use this, though. Are there certain clues that make you go, "Aha! This means I need to use a linked list"?

class List {
  constructor(value, rest) {
    this.value = value;
    this.rest = rest;
  }

  get length() {
    return 1 + (this.rest ? this.rest.length : 0)
  }

  static fromArray(array) {
    let result = null;
    for (let i = array.length - 1; i >= 0; i--) {
      result = new this(array[i], result);
    }
    return result;
  }
}

class ListIterator {
  constructor(list) {
    this.list = list;
  }

  next() {
    if(this.list == null) {
      return {done: true};
    }
    let value = this.list.value;
    this.list = this.list.rest;
    return {value, done: false};
  }
}

Edit 2: I found a Wikipedia article on linked lists. In fact, the version above is the simplest version. It looks like the point of linking these objects together is to make it "easy" (or computationally cheap) to include or exclude members from the list. There are a couple versions: there's a double-linked version, where you refer to the next object as well as the previous object; a circular version, where you take the last object and refer back to the first object; and there's a "sentinel" version, where you put a dummy object at the beginning and/or end to bypass certain edge-cases.

Top answer
1 of 5
3
When would you use this? You use this kind of linked list when you need adding elements at the beginning to be performant, as with linked list it's a O(1) operation (constant), with array it's O(n) operation (linear, depends on the array length). To give you an idea what difference does it make, here are the results of a simple benchmark that adds and removes first element of the list and the array: Running "Head operations (10 elements initially)" suite... list: 25 245 297 ops/s, ±1.39% | fastest array: 10 763 144 ops/s, ±1.05% | slowest, 57.37% slower ------------- Running "Head operations (1000 elements initially)" suite... list: 25 023 637 ops/s, ±1.59% | fastest array: 2 400 441 ops/s, ±0.91% | slowest, 90.41% slower ------------- Running "Head operations (100000 elements initially)" suite... list: 25 239 208 ops/s, ±1.78% | fastest array: 13 547 ops/s, ±0.42% | slowest, 99.95% slower benchmark code As you can see, the list performance remains constant, while the array performance quickly deteriorates the more elements it has (of course it's a tradeof, for different operations, like accessing the nth element, the array would be much faster). Does the book mean that they share content? Yes, it just means that you can create different lists that share some of the structure, like: const a = { value: 1, rest: null, } const b = { value: 2, rest: a, } const c = { value: 3, rest: a, } console.log({ a, b, c }) Here we have three lists, where list a is a "base", and both list b, and list c use the list a as a part of their sturcture.
2 of 5
3
I think it's an implementation of a linked list. Those have the advantage of being able to insert in the middle without having to re-index - it's O(1) instead of O(n).
🌐
DEV Community
dev.to › fihra › arrays-vs-lists-vs-arraylists-1da4
List vs Array: Arrays vs. Lists vs. ArrayLists - DEV Community
September 11, 2019 - "A list is an object which holds variables in a specific order." - Source · In retrospect, this is the dynamic array like in Ruby and Javascript that we can use for C#.