I have the following fragment that what it does is store the object obtained in response to the promise in the variable objectNew .then (res = > .....
var objetoNew ={};
firebaseService.tiendas().then(res=>{
console.log('method1', res);
objetoNew = res;
})
console.log(objetoNew);
when I do the console.log within the then, if I get the data, but when making the object console out of the promise this variable is still empty, That is, I am not overwriting the global variable (New object) from the then.
Thank you very much friends!