kottans / frontend

:octocat: Kottans frontend course 🎓
https://kottans.org/frontend/
MIT License
1.23k stars 361 forks source link

TJSW: clarify reasoning behind controlled order of properties #439

Open OleksiyRudenko opened 1 year ago

OleksiyRudenko commented 1 year ago

As of ES2020 object keys iteration order follows definition order in nearly all (if not all) methods of iteration thorough object properties. Actual goal: order of properties must be controlled when it is important. We need to handle situations when definition order is not controlled at source (e.g. API responses, new literals do not follow implicit convention).