|
|
|
|
|
by cmpolis
1427 days ago
|
|
this is a great way to store structured data in js since it saves the memory cost having repeated keys. e.g.: records = {
time: [1000, 1001],
price: [20, 25],
volume: [50, 15]
}
records = [
{ time: 1000, price: 20, volume: 50 },
{ time: 1001, price: 25, volume: 15 }
]
// not a big difference with 2 records, but for xxxx records...
|
|