Skip to content

Commit 2e7c19f

Browse files
committed
Phrasing
1 parent aa3344a commit 2e7c19f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

control-flow/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ setTimeout(() => {
1717
console.log('Wash face and hands');
1818
```
1919

20-
In the above code, our compiler goes through one line at a time executing each instruction. It doesn't pause to wait, so it'll simply run the `setTimeout` then carry on and run the subequent `console.log`. Then (a small moment later), it will log the `Use lavatory` output.
20+
In the above code our compiler goes through each line executing each instruction. First it logs `Clean teeth`. Then it doesn't hang around for the `setTimeout`, it simply carries on and logs `Wash face and hands`. Then (a small moment later), it will log `Use lavatory`.
2121

22-
This isn't what we want. We'll have to go wash our hands again. In production code, even worse things can happen. To get around this we can use _control flow_.
22+
This is not what we want. We'll have to go wash our hands again. In production code, even worse things can happen.
2323

24-
Node offers 3 approaches we can use to control the order in which our code executes. _Callbacks_, _promises_ and _async/await_. Let's take a look at each.
24+
Thankfully Node offers 3 approaches we can use to control the order in which our code executes. _Callbacks_, _promises_ and _async/await_. Let's take a look at each.
2525

2626
## Callbacks
2727

0 commit comments

Comments
 (0)