I have a function that comes out of axios request.
When I do this the console log displays the correct result:
but I don't know how to assign it to a variable so I can operate on it later. I have either some errors or undefined or message in terminal "[Function: new2] or somethink like variable is not definied etc
function new2(a) {
console.log("new item = " + a);
} // success
but
function new2(b) {
const variable = b
return variable;
}
console.log("new item=" + new2()) // not work ;/
console.log("new item=" variable) // not work , etc