Using jQuery we can call a service, this service will return a response. With Promises in javascript we wait for the response’s values and then, continue with the program execution.
Links:
- Fake Online REST API: https://jsonplaceholder.typicode.com
- Función sin promesa: https://codepen.io/miguelcarrrasco/pen/dqJjJV
- Función con promesa: https://codepen.io/miguelcarrrasco/pen/dqJeBB