Skip to content

Commit ec9a99d

Browse files
authored
Update article.md
1 parent d11abce commit ec9a99d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

1-js/03-code-quality/04-ninja-code/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ While choosing a name try to use the most abstract word. Like `obj`, `data`, `va
8383

8484
Give them a try. A young initiate may wonder -- are such names really useful for a ninja? Indeed, they are!
8585

86-
Sure, the variable name still means something. It says what's inside the variable: a string, a number or something else. But when an outsider tries to understand the code, he'll be surprised to see that there's actually no information at all! And will ultimately fail to alter your well-thought code.
86+
Sure, the variable name still means something. It says what's inside the variable: a string, a number or something else. But when an outsider tries to understand the code, they'll be surprised to see that there's actually no information at all! And will ultimately fail to alter your well-thought code.
8787

8888
The value type is easy to find out by debugging. But what's the meaning of the variable? Which string/number does it store?
8989

@@ -153,7 +153,7 @@ function ninjaFunction(elem) {
153153
}
154154
```
155155

156-
A fellow programmer who wants to work with `elem` in the second half of the function will be surprised... Only during the debugging, after examining the code they will find out that he's working with a clone!
156+
A fellow programmer who wants to work with `elem` in the second half of the function will be surprised... Only during the debugging, after examining the code they will find out that they're working with a clone!
157157

158158
Seen in code regularly. Deadly effective even against an experienced ninja.
159159

@@ -197,7 +197,7 @@ function render() {
197197

198198
A programmer who jumps inside the `render` will probably fail to notice that there's a local `user` shadowing the outer one.
199199

200-
Then he'll try to work with `user` assuming that it's the external variable, the result of `authenticateUser()`... The trap is sprung! Hello, debugger...
200+
Then they'll try to work with `user` assuming that it's the external variable, the result of `authenticateUser()`... The trap is sprung! Hello, debugger...
201201

202202

203203
## Side-effects everywhere!

0 commit comments

Comments
 (0)