Skip to content

Commit

Permalink
Fix grammatical error on en-us URL page (#27763)
Browse files Browse the repository at this point in the history
  • Loading branch information
Slessi authored Jul 4, 2023
1 parent ac76c31 commit 5debaf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/en-us/web/api/url/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ console.log(url.hostname); // "www.example.com"
console.log(url.pathname); // "/cats"
```

The constructor with raise an exception if the URL cannot be parsed to a valid URL.
The constructor will raise an exception if the URL cannot be parsed to a valid URL.
You can either call the above code in a [`try...catch`](/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) block or use the [`canParse()`](/en-US/docs/Web/API/URL/canParse_static) static method to first check the URL is valid:

```js
Expand Down

0 comments on commit 5debaf5

Please sign in to comment.