Skip to main content

Posts

Showing posts with the label Angular Promises

AngularJS Promises

AngularJS Promises Answer AngularJS Promises questions below and test your knowledge about AngularJS Promises. 1. A promise implementation in one of its simplest forms is as follows: A) var promise = new Promise( () => ()); B) var promise = new Promise( () -> {}); C) var promise = new Promise( () => []); D) var promise = new Promise( () => {}); 2. A promise represents the final result of an . . . . . . . operation. A) asynchronous B) synchronous 3. A promise may be in one of the following states:(choose all that apply) A) Pending state B) Resolved state C) Rejected state D) Controlled state 4. The . . . . . method is a shorthand for promise.then(null, errorCallback). A) errorCallback() B) Call() C) catch() D) reject() 5. Promises require the caller to have access to the original function that returned the Promise in order to have a retry capability. A) True B) False 6. The promise constructor doesn't care at all about how the executor function b...