Array with objects
See original GitHub issueWhat’s prefered?
const x = [{
y: 'foo',
z: 'bar',
}, {
y: 'foo',
z: 'bar',
}]
or
const x = [
{
y: 'foo',
z: 'bar',
},
{
y: 'foo',
z: 'bar',
},
]
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
JavaScript Array of Objects Tutorial – How to Create, Update ...
Arrays of objects don't stay the same all the time. We almost always need to ... To add an object at the first...
Read more >Data Structures: Objects and Arrays - Eloquent JavaScript
Objects and arrays (which are a specific kind of object) provide ways to group several values into a single value. Conceptually, this allows...
Read more >How to Create Array of Objects in Java? - GeeksforGeeks
An Array of Objects is created using the Object class, and we know Object class is the root class of all Classes. We...
Read more >JavaScript Arrays - W3Schools
Arrays are a special type of objects. The typeof operator in JavaScript returns "object" for arrays. But, JavaScript arrays are best described as...
Read more >Array - JavaScript - MDN Web Docs
The Array object, as with arrays in other programming languages, enables storing a collection of multiple items under a single variable name ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Either seem acceptable to me.