Stable array sortBaseline · Widely available
Stable array sort() function
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jan 15, 2020. Widely available since Jul 15, 2022.
Browser support
DesktopChrome
1–69Not supported
70+Supportedsince Oct 16, 2018
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
1–2Not supported
3+Supportedsince Jun 17, 2008
Current: 157Safari
1–10Not supported
10.1+Supportedsince Mar 27, 2017
Current: 27MobileChrome Android
18–69Not supported
70+Supportedsince Oct 17, 2018
Current: 155Firefox Android
4+Supportedsince Mar 29, 2011
Current: 157Safari iOS
1–10Not supported
10.3+Supportedsince Mar 27, 2017
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN — see the links below.
Feature detection
JS · check before using
if ("sort" in Array || ("prototype" in Array && "sort" in Array.prototype)) {
// Array.sort is available
}