I'd like to ask how could I sort an array of string per priority email domain?
For example, this is my priority list
1st: gmail.com
2nd: outlook.com
3rd: yahoo.com
4th: hotmail.com
5th: live.com
6th: Other Domain
So, if this is my string
const personalEmail = ['[email protected]','[email protected]','[email protected]','[email protected]','[email protected]']
What are ways to achieve this?