Sure.
var arr = [1,2,3,4,5];
arr.prop = 'value';
Arrays are already objects in JavaScript — they just have some extra features and a special literal syntax.
More Related Contents:
- Why I am getting number as output when I’m using array.push [closed]
- Transposing a 2D-array in JavaScript
- How to find object in array by property in javascript?
- How to get distinct values from an array of objects in JavaScript?
- Fastest way to convert JavaScript NodeList to Array?
- Splitting a JS array into N arrays
- How to sort numbers correctly with Array.sort()? [duplicate]
- Is reading the `length` property of an array really that expensive an operation in JavaScript?
- Why do empty JavaScript arrays evaluate to true in conditional structures?
- Sort Array by ISO 8601 date
- Javascript – convert array of arrays into array of objects with prefilled values
- How to combine an array in javascript
- Array() vs new Array()
- How do I remove an object from an array with JavaScript? [duplicate]
- Sort array containing objects based on another array [duplicate]
- javascript function inArray
- traversing through JSON string to inner levels using recursive function
- In JavaScript, what is the best way to convert a NodeList to an array?
- Do loops check the array.length every time when comparing i against array.length?
- Big O of JavaScript arrays
- Difference between using Array.isArray and instanceof Array
- weird array behaviour in javascript [duplicate]
- How to set DOM element as first child?
- Combining two arrays to form a javascript object
- Trying to solve symmetric difference using Javascript
- Strings as keys of array
- What does [] mean in JavaScript?
- A better way to splice an array into an array in javascript
- Create a dynamic nested object from array of properties
- Javascript: Sort array of arrays by second element in each inner array