Skip to content

Commit 559841c

Browse files
committed
Fixing example code
1 parent 16f166a commit 559841c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

control-flow/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Let's look at one such alternative.
120120
To avoid this callback hell, we can use a different structure called _promises_. A promise is a function that returns a _resolved_ response which we can chain using `then`, or a _rejected_ response which we can `catch`. It follows this pattern:
121121

122122
```
123-
runOurPromise() // returns a response
123+
ourPromiseFunction() // returns a promise that will resolve or reject
124124
.then(response => {
125125
return foo; // this could optionally be another promise
126126
})

0 commit comments

Comments
 (0)