Is there a more elegant way to sort every array in this object? Currently, I am doing it as shown below:
this.userInfo = {
Interests: [],
Websites: [],
Games: [],
Locations: [],
Companies: [],
Projects: [],
Schools: [],
Studies: []
};
this.userInfo.Interests.sort();
this.userInfo.Websites.sort();
this.userInfo.Games.sort();
this.userInfo.Locations.sort();
this.userInfo.Companies.sort();
this.userInfo.Projects.sort();
this.userInfo.Schools.sort();
this.userInfo.Studies.sort();
Open to suggestions for optimization?