Skip to content

Commit 9195d65

Browse files
committed
docs(url): fixed typo
1 parent cbf0de0 commit 9195d65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/url.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ let url = new URL('https://example.com');
1818

1919
```javascript
2020
const url1 = new URL('page2.html', 'http://example.com/page1.html');
21-
url2.href // "http://example.com/page2.html"
21+
url1.href // "http://example.com/page2.html"
2222

2323
const url2 = new URL('..', 'http://example.com/a/b.html')
24-
url3.href // "http://example.com/"
24+
url2.href // "http://example.com/"
2525
```
2626

2727
这种写法很方便基于现有网址,构造新的 URL。

0 commit comments

Comments
 (0)