Sort and reverse issue

Hi,
i seen a leason about sort and reverse just now
the problem i have is that the sort working in a strange way above 10 number, like that
const sortedArray = [1,3,9,4,2,11];

console.log(sortedArray.sort());

console.log(sortedArray.reverse());

output:
[ 1, 11, 2, 3, 4, 9 ]
[ 9, 4, 3, 2, 11, 1 ]

so how can i realy sort it correctly? or the only way is to loop it?

found the problem and a fix
i wish Mosh told it in the video @Mosh