like to order spagetti, then the waiter will tell the chef to cook the spagetti, and obviously the chef need some time to cook it. After a while, spagetti is done and the waiter will serve u with spagetti
so Promise works the same like that, and to describe(notice that inside bracket is computer terms)
CUSTOMER(CLIENT) who requesting something to SERVER
WAITER(INTERNET) is the one that carry the information need to send to SERVER
CHEF(SERVER) is the one that receive the information and it will try to give the best response back to customer
And easy example would be like
open this link in browser:
http://jsonplaceholder.typicode.com/users
http://jsonplaceholder.typicode.com/users/2
http://jsonplaceholder.typicode.com/users/3
you will see some data ni JSON
What kind of tech are u using right now?
is one of them jQuery, angularJS, axios
sry late reply, i am using jquery right now
Обсуждают сегодня