What do you want to save?
Add Code snippet
New code examples
-
Other 2021-08-31 12:43:01
sending value to promise
var some_function = function(username, password) { return new Promise(function(resolve, reject) { /*stuff using username, password*/ if ( /* everything turned out fine */ ) { resolve("Stuff worked!"); } else { reject(Error(&q... Add solution