Current situation: I'm having a code that is handling API. And im trying to map it and return it as a string.
const C = this.functionA('ID_123').then(function(value) {
console.log("JR TEST 3", value.user.name);
return value.user.name;
});
The code above is to call the function and under 'JR TEST 3' console it return this result which is correct: JR TEST 3 USERNAME
But when I use
const C = this.functionA('ID_123').then(function(value) {
console.log("JR TEST 3", value.user.name);
return value.user.name;
});
console.log('JR TEST 4', C);
Anyone know how to solve this?