var arr = ['绵阳', 'aaa', '资阳', 55, '成都', 2, 'chengdu','abc']; var result = arr.sort(function(a, b){return (a + '').localeCompare(b + '')}); console.log(result); //[2, 55, "成都", "绵阳", "资阳", "aaa", "abc", "chengdu"]