Read the followings sections from Chapter 11 of Eloquent Javascript:
From the MDN JavaScript Guide, read Using Promises