From b854b460508fcadcec616fcecab961532261fe87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=AA=20Duy=20Quang?= Date: Thu, 14 Jan 2021 11:55:08 +0700 Subject: [PATCH] Converted all tabs to spaces. --- .../javascript/cannot-read-property.md | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/src/content/resources/language/javascript/cannot-read-property.md b/src/content/resources/language/javascript/cannot-read-property.md index 437d221..604b9e8 100644 --- a/src/content/resources/language/javascript/cannot-read-property.md +++ b/src/content/resources/language/javascript/cannot-read-property.md @@ -56,9 +56,9 @@ This applies to nonexistent array indices as well. ```js > let keyMapping = { moveUp: "KeyW", - moveDown: "KeyS", - moveLeft: "KeyA", - moveRight: "KeyD" + moveDown: "KeyS", + moveLeft: "KeyA", + moveRight: "KeyD" }; undefined > keyMapping.mvoeDown @@ -84,22 +84,22 @@ read property" error might arise. ```html - -

Welcome to The programmer's hangout.

-

- This is the place for programmers of any skill level to, well, hangout - with other fellow programmers. Whether you have just written 5 lines of - code or been a code nerd for 15 years, you are always welcome! -

- - + +

Welcome to The programmer's hangout.

+

+ This is the place for programmers of any skill level to, well, hangout + with other fellow programmers. Whether you have just written 5 lines of + code or been a code nerd for 15 years, you are always welcome! +

+ + ``` @@ -143,21 +143,21 @@ one can make sure what is in their hands isn't JavaScript's default ```js async function onCommand(channel, arguments) { // Assuming the command is not empty and - // there is always the first argument. + // there is always the first argument. let commandName = arguments[0]; - switch (commandName) { - // ... - case "getUser": - if (arguments.length < 2) - throw "Usage: /getUser "; - // It is guaranteed now that "arguments" has at least 2 elements - // and thus there is an index 1. - let username = arguments[1]; - let user = await botClient.fetchUser(username); - channel.send(JSON.stringify(user); - break; - // ... - } + switch (commandName) { + // ... + case "getUser": + if (arguments.length < 2) + throw "Usage: /getUser "; + // It is guaranteed now that "arguments" has at least 2 elements + // and thus there is an index 1. + let username = arguments[1]; + let user = await botClient.fetchUser(username); + channel.send(JSON.stringify(user); + break; + // ... + } } ``` @@ -170,8 +170,8 @@ sure that situation is handled properly. async function getUserID(username) { // Assuming "username" is guaranteed to be a string. let user = await botClient.fetchUser(username); - if (user == null) throw "There is no user with that name."; - // It is guaranteed now that "user" isn't null. + if (user == null) throw "There is no user with that name."; + // It is guaranteed now that "user" isn't null. return user.id; } ```