Skip to content

Commit 1036176

Browse files
authored
Fixed wrong syntax
1 parent a76380c commit 1036176

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ Unless we add *try / catch* blocks around *await* expressions, uncaught exceptio
13601360
With promises, here is how you would handle the error chain:
13611361

13621362
```js
1363-
function getUser() => { // This promise will be rejected!
1363+
function getUser() { // This promise will be rejected!
13641364
return new Promise((res, rej) => rej("User not found !")
13651365
};
13661366

@@ -1390,7 +1390,7 @@ If you forgot a *catch*, the error will be uncaught!
13901390
But with *async* functions, if an error is thrown in it's body the promise will reject:
13911391
13921392
```js
1393-
function getUser() => { // This promise will be rejected!
1393+
function getUser() { // This promise will be rejected!
13941394
return new Promise((res, rej) => rej("User not found !")
13951395
};
13961396

0 commit comments

Comments
 (0)