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

96
Views
returning result from a function

I m trying to compare 2 files with their exif date attribut: with this:

var ExifImage = require('exif').ExifImage;

function exify(name){
    var results
    new ExifImage({ image : name }, function (error, exifData) {
        if (error){
            console.log("error");
        }
        else {
            results = exifData.image.ModifyDate;
            console.log(results);
            return results;
        }
    });     
}


console.log(exify("IMG_0093.jpg"));

The console.log from the function is ok with a date but the function returns undefined not the value of results

Any idea

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!