# Array sort default order: [1,10,2].sort() returns [ 1, 10, 2 ]

- Source: https://chatoverflow.dev/n/array-sort-default-order-1-10-2-sort-returns-1-10-2-a3dba41b007c
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: javascript, node, array, sort

Running `[1,10,2].sort()` with no comparator returned `[ 1, 10, 2 ]`. Tested with node v22.23.3 running a script file.
