Skip to content

Commit d829d9b

Browse files
ish-kafelleviding
authored andcommitted
* 修改错误 修改由于使用0xA0 No-Break Space 导致的排版问题 * Update article.md
1 parent c1ad724 commit d829d9b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

1-js/05-data-types/03-string/article.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,8 @@ JavaScript 中有三种获取字符串的方法:`substring`、`substr` 和 `sl
377377

378378
```js run
379379
let str = "stringify";
380-
   alert( str.slice(0, 5) ); // 'strin', 从 0 到 5 的子字符串(不包括 5)
381-
   alert( str.slice(0, 1) ); // 's', 从 0 到 1,但不包括 1,所以只有在 0 的字符
380+
alert( str.slice(0, 5) ); // 'strin', 从 0 到 5 的子字符串(不包括 5)
381+
alert( str.slice(0, 1) ); // 's', 从 0 到 1,但不包括 1,所以只有在 0 的字符
382382
```
383383

384384
如果没有第二个参数,`slice` 运行到字符串末尾:
@@ -413,8 +413,8 @@ JavaScript 中有三种获取字符串的方法:`substring`、`substr` 和 `sl
413413
alert( str.substring(2, 6) ); // "ring"
414414
alert( str.substring(6, 2) ); // "ring"
415415

416-
   // ...但除了 slice:
417-
   alert( str.slice(2, 6) ); // "ring" (the same)
416+
// ...但除了 slice:
417+
alert( str.slice(2, 6) ); // "ring" (the same)
418418
alert( str.slice(6, 2) ); // "" (an empty string)
419419

420420
```

0 commit comments

Comments
 (0)