|
|
|
|
|
by spriggan3
3706 days ago
|
|
The advantage of promises is that you can return them as a type, you can't do that with a callback. If you fetch something from a database , your data access object can return a promise and let the client code deal with the result. Promises are composable by nature, callbacks are not. |
|