loginTest() gives me resolve(value) so it goes to .then , my problem is since promise is async code, console.log(token) gets printed with promise-pending before promise fulfills.I want to display the value only after promise is fulfilled.Can any one help ?
 const token = loginTest().then(res => res).catch(err => err);
 console.log(token);
 
     
     
     
     
    