Merge pull request #484 from pyz1989/patch-1

Update 源字符串 to 原字符串
This commit is contained in:
Ruan YiFeng
2017-08-23 07:11:36 +08:00
committed by GitHub
+2 -2
View File
@@ -232,8 +232,8 @@ ES6 提供字符串实例的`normalize()`方法,用来将字符的不同表示
传统上,JavaScript只有`indexOf`方法,可以用来确定一个字符串是否包含在另一个字符串中。ES6又提供了三种新方法。
- **includes()**:返回布尔值,表示是否找到了参数字符串。
- **startsWith()**:返回布尔值,表示参数字符串是否在字符串的头部。
- **endsWith()**:返回布尔值,表示参数字符串是否在字符串的尾部。
- **startsWith()**:返回布尔值,表示参数字符串是否在字符串的头部。
- **endsWith()**:返回布尔值,表示参数字符串是否在字符串的尾部。
```javascript
var s = 'Hello world!';