0
    function myFunction(){
    let somevariable=1;
    doSomething({},(data)=>{
        somevariable=data;
    });
    return somevariable;
}

The return should happen only after the callback which is inside doSomething , how will i do it

Asher MS
  • 1
  • 1
  • 3

0 Answers0