let be this object:
{
type: string,
date: Date
}
I have an array of objects as above and I want to sort it to get first items that have 'Premium' as type and then list all the others, ordered by date.
How to accomplish to this with sort
method of Javascript?