Skip to content
Advertisement

Tag: promise

Returning [object Promise] instead of actual value

I am new to promises as I am trying to get some objects to show there actual values on a webpage. Instead I am just getting a bunch of [object Promise] instead This is the code I have so far: What I tried I tried reading the firefox promise.resolve method as that seems like what I was looking for: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve

What is the relationship, if any, between the “executor” and the function passed to the then() method? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question The “executor” function I am referring to: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#parameters And the then() method: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then Seems like there is some overlap between their meaning or purpose. In

Cannot finish a race with timer in RxJS

Code above will output 2. If I have an action that I try to repeat until condition is met but ignore it if it takes too long, then I take an approach in this answer https://stackoverflow.com/a/51644077 The problem is that race never finishes with the shortest function. The longActionObservable repeats until the condition is met and empty() is called. This

Advertisement