Skip to content

Commit 54cd45a

Browse files
authored
typo: paramater -> parameter (#3253)
1 parent afae1a8 commit 54cd45a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

locale/en/knowledge/HTTP/clients/how-to-access-query-string-parameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ http.createServer(function (req, res) {
2424

2525
> To test this code run `node app.js` (app.js is name of the file) on the terminal and then go to your browser and type `http://localhost:8080/app.js?foo=bad&baz=foo` on the URL bar
2626
27-
The key part of this whole script is this line: `const queryObject = url.parse(req.url,true).query;`. Let's take a look at things from the inside-out. First off, `req.url` will look like `/app.js?foo=bad&baz=foo`. This is the part that is in the URL bar of the browser. Next, it gets passed to `url.parse` which parses out the various elements of the URL (NOTE: the second paramater is a boolean stating whether the method should parse the query string, so we set it to true). Finally, we access the `.query` property, which returns us a nice, friendly JavaScript object with our query string data.
27+
The key part of this whole script is this line: `const queryObject = url.parse(req.url,true).query;`. Let's take a look at things from the inside-out. First off, `req.url` will look like `/app.js?foo=bad&baz=foo`. This is the part that is in the URL bar of the browser. Next, it gets passed to `url.parse` which parses out the various elements of the URL (NOTE: the second parameter is a boolean stating whether the method should parse the query string, so we set it to true). Finally, we access the `.query` property, which returns us a nice, friendly JavaScript object with our query string data.
2828

2929
The `url.parse()` method returns an object which have many key value pairs one of which is the `query` object. Some other handy information returned by the method include `host`, `pathname`, `search` keys.
3030

locale/en/knowledge/javascript-conventions/how-to-create-default-parameters-for-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ console.log("Without parameter:");
5555
example();
5656
betterExample();
5757

58-
console.log("\nWith paramater:");
58+
console.log("\nWith parameter:");
5959
example("parameter was passed");
6060
betterExample("parameter was passed");
6161

0 commit comments

Comments
 (0)