loading...

re: Enhanced Object Literals in ES6 VIEW POST

FULL DISCUSSION
 

You could throw in a count, and the name, in case you want to iterate by index.

{
[name + ++i]: "Apple",
[name + ++i]: "Dell",
[name + ++i]: "HP",
count: i,
name
}

Code of Conduct Report abuse