What is a Promise in JavaScript?



What is a Promise in JavaScript?..

Answer / hr@tgksolutions.com

A Promise represents a value that may be available now, later, or never.
States of a Promise:
1. Pending: Initial state, not fulfilled or rejected.
2. Fulfilled: Operation completed successfully.
3. Rejected: Operation failed.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JavaScript Interview Questions

Which built-in method returns the characters in a string beginning at the specified location?

0 Answers  


About document.getElementID? Explain giving one example. This was asked by a interviewer when i said that i know some JavaScript.

2 Answers   TCS,


How much does a javascript developer make?

0 Answers  


Do hackers use javascript?

0 Answers  


What are the boolean operators supported by javascript? And operator: &&

0 Answers  


Which type of variable among global and local, takes precedence over other if names are same?

0 Answers  


You have an asp. Net web application running on a web-farm that does not use sticky sessions - so the requests for a session are not guaranteed to be served the same machine. Occasionally, the users get error message validation of view state mac failed. What could be one reason that is causing this error?

0 Answers  


Public Static Void Main(String args[]) { System.out.in("Hai.."); } In the above code why string args[] is required.... If we are not giving command line argument..

0 Answers  


Are you concerned that older browsers don't support javascript and thus exclude a set of web users? Individual users?

0 Answers  


What is a function object?

0 Answers  


What are the types of data types?

0 Answers  


What is an empty html tag?

0 Answers  


Categories