objects in array js code example
Example 1: array of objects javascript
var widgetTemplats = [
{
name: 'compass',
LocX: 35,
LocY: 312
},
{
name: 'another',
LocX: 52,
LocY: 32
}
]
Example 2: get item in array from index
var valueAtIndex1 = myValues[1];
Example 3: js objects in array
let car = cars.find(car => car.color === "red");