function getInfoByName(title) {
const thingy = cli.get({
'name': title
});
thingy.then((value) => {
arr = value;
console.log(arr);
return arr;
});
}
It logs properly but returns undefined. I don't understand why it waits to resolve the promise for console.log but not for return, sorry for the unnecessary issue but I'm desperate.