I would like to allocate names for the index in an array while using for loop. how can i achieve this. please guide me.
// using in a http response
for (let i = 0; i <= 6; i++) {
this.sf.push({f(i) : // do something)
};
i want to get something like
f0: 1,
f1: 5,
f2: 9