-3

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?

Kilian Foth
  • 107,706
  • 45
  • 295
  • 310
  • 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

1 Answers1

0

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.

Frank Puffer
  • 6,411
  • 5
  • 21
  • 38