Published
Edited
Jun 20, 2020
Insert cell
Insert cell
[10, 60, 20, 30, 100].sort()
Insert cell
[10, 60, 20, 30, 100].sort((item, otherItem) => item - otherItem)
Insert cell
[10, 60, 20, 30, 100].sort((item, otherItem) => {
return item.toString().localeCompare(otherItem.toString())
})
Insert cell
Insert cell
[10, 60, 20, 30, 100].sort((item, otherItem) => {
return item.toString().localeCompare(otherItem.toString(), "en-u-kn")
})
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more