From 4973824930f8c44687f66b61c610cdeef3958a21 Mon Sep 17 00:00:00 2001 From: Beginnerds <48506689+Beginnerds@users.noreply.github.com> Date: Tue, 28 Jan 2020 16:35:09 +0530 Subject: [PATCH] Update article.md Corrected grammatical errors. --- 5-network/07-url/article.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/5-network/07-url/article.md b/5-network/07-url/article.md index b2e11b59..591a55af 100644 --- a/5-network/07-url/article.md +++ b/5-network/07-url/article.md @@ -3,9 +3,9 @@ The built-in [URL](https://url.spec.whatwg.org/#api) class provides a convenient interface for creating and parsing URLs. -There are no networking methods that require exactly an `URL` object, strings are good enough. So technically we don't have to use `URL`. But sometimes it can be really helpful. +There are no networking methods that require exactly a `URL` object, strings are good enough. So technically we don't have to use `URL`. But sometimes it can be really helpful. -## Creating an URL +## Creating a URL The syntax to create a new `URL` object: @@ -63,14 +63,14 @@ Here's the cheatsheet for URL components: ```smart header="We can pass `URL` objects to networking (and most other) methods instead of a string" -We can use an `URL` object in `fetch` or `XMLHttpRequest`, almost everywhere where an URL-string is expected. +We can use a `URL` object in `fetch` or `XMLHttpRequest`, almost everywhere where a URL-string is expected. -Generally, `URL` object can be passed to any method instead of a string, as most method will perform the string conversion, that turns an `URL` object into a string with full URL. +Generally, `URL` object can be passed to any method instead of a string, as most method will perform the string conversion, that turns a `URL` object into a string with full URL. ``` ## SearchParams "?..." -Let's say we want to create an url with given search params, for instance, `https://google.com/search?query=JavaScript`. +Let's say we want to create a url with given search params, for instance, `https://google.com/search?query=JavaScript`. We can provide them in the URL string: