Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

113
Views
I cannot extract the result of the function (axios request) to a variable

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 
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!