fix: string convertion section
This commit is contained in:
1 parent
ebe275bd52
commit
c73448ce38
1 file changed
+1
-1
@@ -124,7 +124,7 @@ let name = 'Pikachu'; // can use "" or ''
|
||||
```
|
||||
JavaScript可以用的一些方法:[charAt](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/charAt), [charCodeAt](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt), [fromCharCode](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode), [indexOf](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf), [lastIndexOf](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf), [replace](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/replace), [split](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/split), [substring](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/substring), [toLowerCase](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase), [toUpperCase](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase)
|
||||
|
||||
要访问字符串s的字符,使用s[index]或s. charat (index):
|
||||
要访问字符串s的字符,使用s[index]或s.charAt(index):
|
||||
```javascript
|
||||
let firstLetter = puppyCount[0]; // "1"
|
||||
let fourthLetter = puppyCount.charAt(3); // "p"
|
||||
|
||||
Reference in new issue
Block a user