mirror of
https://github.com/apachecn/eloquent-js-3e-zh.git
synced 2025-05-29 16:22:22 +00:00
Update 1.md
change “A” to "a"
This commit is contained in:
parent
278b742ecd
commit
70f26b19ee
2
1.md
2
1.md
@ -200,7 +200,7 @@ console.log("Aardvark" < "Zoroaster")
|
||||
// → true
|
||||
```
|
||||
|
||||
字符串排序的方式大致是字典序,但不真正是你期望从字典中看到的那样:大写字母总是比小写字母“小”,所以`"Z"<"A"`,非字母字符(`!`,`-`等)也包含在排序中。 比较字符串时,JavaScript 从左向右遍历字符,逐个比较 Unicode 代码。
|
||||
字符串排序的方式大致是字典序,但不真正是你期望从字典中看到的那样:大写字母总是比小写字母“小”,所以`"Z"<""`,非字母字符(`!`,`-`等)也包含在排序中。 比较字符串时,JavaScript 从左向右遍历字符,逐个比较 Unicode 代码。
|
||||
|
||||
其他类似的运算符则包括`>=`(大于等于),`<=`(小于等于),`==`(等于)和`!=`(不等于)。
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user