Priority Queue Code Problems

I’ve been searching around a lot for a way to use priority queues in JS, however I couldn’t find anything. This is a pretty simple question but does anyone know how I can do declare and use a priority queue in Javascript?

If you talk about a priority queue in the usual sense, you can use a generic SortedList and specify a custom compare function, or implement the IComparable interface on your elements and provide your compare function there.