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
    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
