- 4
var prom=function(){ return new Promise((resolve,reject)=>{ var a=10; resolve(a); reject(a); }) }
Guys Intermediate value .then is not a function I got this error
9 Respuestas
0
Will u please share your code link
0
Debug:
var prom=function(){
return new Promise((resolve,reject)=>{
var a=10;
resolve(a);
reject(a);
})
}
prom().then(a=>console.log(a));
or
prom().then(result=>console.log(result));
0
Debug:
var prom=function(){
return new Promise((resolve,reject)=>{
var a=10;
resolve(a);
reject(a);
})
}().then(result=>{console.log(result)});
0
Vasiliy i was also coming with the same answer but never mind
I was just typing the answer but ....
0
HrCoder, I cannot understand what you mean.
- 1
I got this same syntax error
- 3
U copy paste on ur IDE
- 3
var prom=function(){
return new Promise((resolve,reject)=>{
var a=10;
resolve(a);
reject(a);
})
}.then(()=>{console.log(result)})
Guys Intermediate value .then is not a function I got this error
- 4
I don't have broo I only share this code