We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
var json={ 王五:3,赵六:4,张三:1,李四:2, }
return Object.keys(json).sort(function(a,b){ return a.localeCompare(b); }); //Browser Results ['李四', '王五', '张三', '赵六'] //jint Results ['张三', '李四', '王五', '赵六']
return Object.keys(json).sort(); //Browser Results ['张三', '李四', '王五', '赵六'] //jint Results ['张三', '李四', '王五', '赵六']
There is inconsistency in the comparison method of localeCompare, and I don't know how to solve it
The text was updated successfully, but these errors were encountered:
A pull request with a fix would be appreciated. I cannot read or comprehend those characters.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
var json={
王五:3,赵六:4,张三:1,李四:2,
}
return Object.keys(json).sort(function(a,b){
return a.localeCompare(b);
});
//Browser Results ['李四', '王五', '张三', '赵六']
//jint Results ['张三', '李四', '王五', '赵六']
return Object.keys(json).sort();
//Browser Results ['张三', '李四', '王五', '赵六']
//jint Results ['张三', '李四', '王五', '赵六']
There is inconsistency in the comparison method of localeCompare, and I don't know how to solve it
The text was updated successfully, but these errors were encountered: