Shoppable interview question

What does this Javascript code do? (promises)