This question already has an answer here:

This page on JS Promises says it is a software abstraction. What is a software abstraction and why is the JS Promises called software abstration?

marked as duplicate by gnat, TZHX, jk., Bart van Ingen Schenau, Andres F. Feb 17 '17 at 14:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Do you know what an abstraction is in general, regardless of software and programming? – Andres F. Feb 17 '17 at 14:53
  • Abstraction has different meanings based on the context it is being used. The abstract has a meaning in the world of a written script versus art. In the software engineering it is being used as a principle for modeling the software. What confused me is that how this JS library help to have an abstract and different implementations that the developers can choose. – wonderful world Feb 17 '17 at 18:49

A JS Promise is a language feature that can be used whenever you need "a value which may be available now, or in the future, or never". If this case occurs repeatedly in your code, it makes sense to use Promises instead of implementing your own code to handle this over and over again.

Therefore it can be called an abstraction.

Not the answer you're looking for? Browse other questions tagged or ask your own question.