出于好奇,这里究竟适用什么规则?
alert([-Infinity, -1, Infinity, 0, 1].sort());
输出:-1, -Infinity, 0, 1, Infinity
JSFiddle:http: //jsfiddle.net/8tVGb/
-Infinity 如何在 -1 和 0 之间排序?
出于好奇,这里究竟适用什么规则?
alert([-Infinity, -1, Infinity, 0, 1].sort());
输出:-1, -Infinity, 0, 1, Infinity
JSFiddle:http: //jsfiddle.net/8tVGb/
-Infinity 如何在 -1 和 0 之间排序?