Skip to main content
Version: 3.45.0

URLSearchParams.sort()

The URLSearchParams.sort() method sorts all key/value pairs contained in this object in place and returns undefined. The sort order is according to unicode code points of the keys. This method uses a stable sorting algorithm (i.e. the relative order between key/value pairs with equal keys will be preserved).

Syntax​

sort()

Parameters​

None.

Return value​

None undefined.