Given an array:
var myList = [ \'Normal\', \'Urgent\', \'Alert\', \'Casual\', \'Follow up\' ];
I want to output this list in say, a dropdown. I
You could use filter to get the special values, sort the rest, and concatenate the parts:
var myList = [ 'Normal', 'Urgent', 'Alert', 'Casual', 'Follow up' ];
myList = myList.filter( v => v === 'Urgent' ).concat(
myList.filter( v => v === 'Alert' ),
myList.filter( v => !['Alert','Urgent'].includes(v) ).sort());
console.log(myList);