What aspect of programming are Promises in ES6 useful? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

What aspect of programming are Promises in ES6 useful?

9th Jul 2019, 9:41 PM
eMBee
eMBee - avatar
4 Answers
+ 2
in simple term if you sent request to server promises await for response while other code still keep running without block by the server request. and promises execute returned request right when it gets. promises are very much use in backend and theres new prromise called async await its very simple and super easy to handle any task.
11th Jul 2019, 9:56 AM
Danielov
Danielov - avatar
+ 4
daneillonge, what about iterators and generators, what aspect of programming are those ones useful?
11th Jul 2019, 10:03 AM
eMBee
eMBee - avatar
+ 3
watch youtube promises lesson from fun fun function and techsith they both explain really good you will clear the concept.
11th Jul 2019, 12:13 AM
Danielov
Danielov - avatar
+ 2
anything that is asynchronous such as a database query, api request, etc, use Promises.
19th Jul 2019, 4:46 AM
Thomas
Thomas - avatar