Hi, sorry, but as far as I can see, your two examples have nothing at all to do with computed property names. Computed property names are about using dynamic names for properties in the object initialiser, not adding them afterwards, as you have always been able to do.
In your two examples your object initialiser specifies no fields at all, and you then add the fields afterwards in the forEach.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi, sorry, but as far as I can see, your two examples have nothing at all to do with computed property names. Computed property names are about using dynamic names for properties in the object initialiser, not adding them afterwards, as you have always been able to do.
In your two examples your object initialiser specifies no fields at all, and you then add the fields afterwards in the forEach.