1. then we don't need Array.from, разумеется, не нужен. -> then we don't need Array.from any more.
2. delete the extra table header
This commit is contained in:
zhangbao 2020-04-05 22:07:27 +08:00 committed by GitHub
parent 23ffde7806
commit 59d791b9d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,7 +86,7 @@ alert( firstMatch.index ); // 0
alert( firstMatch.input ); // <h1>Hello, world!</h1> alert( firstMatch.input ); // <h1>Hello, world!</h1>
``` ```
If we use `for..of` to loop over `matchAll` matches, then we don't need `Array.from`, разумеется, не нужен. If we use `for..of` to loop over `matchAll` matches, then we don't need `Array.from` any more.
## str.split(regexp|substr, limit) ## str.split(regexp|substr, limit)
@ -144,7 +144,6 @@ alert( '12-34-56'.replace( *!*/-/g*/!*, ":" ) ) // 12:34:56
The second argument is a replacement string. We can use special character in it: The second argument is a replacement string. We can use special character in it:
| Symbols | Action in the replacement string |
| Symbols | Action in the replacement string | | Symbols | Action in the replacement string |
|--------|--------| |--------|--------|
|`$&`|inserts the whole match| |`$&`|inserts the whole match|