How do I make a javascript return value from promise?
It sounds like you aren't understanding how promises are used. You return value from a promise. Then, later when your code resolves the promise, it resolves it with a result and that result is passed to the .then() handler attached to the promise: MovieLibrary.getGenres = function() { var promise = new…
Answered Oct 13, 2022 · 1.2K Views Read answer →