I have result from DB with object below. I can only print it to console. How do I eg. use it in formatted console output such as
console.log(`Hello ${name} (${age}) from ${city}`);
Do I save it into array locally and the use it in react component? What is the best practice?
Output from code below:
{ name: 'alice', city: 'New York', age: 34 }
Promise:
Promise.all(promises).then(([res1, res2]) => {
getProfile(res1, res2).then(console.log);
})