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@yahoo.com','email@live.com','email@other.com','email@gmail.com','email@outlook.com']
What are ways to achieve this?