Skip to content

Commit e33266c

Browse files
committed
update solve problem to Add Two Promises
1 parent 140b91a commit e33266c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Diff for: 2723. Add Two Promises/index.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const addTwoPromises = async (promise1, promise2) => {
2+
return new Promise((resolve) => {
3+
promise1.then((value) => {
4+
promise2.then((value2) => {
5+
resolve(value + value2)
6+
})
7+
})
8+
})
9+
}

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
| Return Length of Arguments Passed ||
1616
| Allow One Function Call ||
1717
| Memoize | |
18-
| Add Two Promises | |
18+
| Add Two Promises | |
1919
| Sleep ||
2020
| Timeout Cancellation | |
2121
| Interval Cancellation | |

0 commit comments

Comments
 (0)