I'm using exif.js to pull metadata from images I upload to a CMS. When images do not have meta data, some values return "undefined". What I would like to do is change this "undefined" value to an empty string using something like this: (Credit: Stanley below)
// not set var i means
// i === undefined
var j = (typeof (i) !== 'undefined' ? i : 'not found');
console.log(j); // 'not found'
Yet, After a few hours looking at the code, I still cannot figure out how exif.js is returning the undefined value so that I can change it to an empty string.
Link to exif.js: https://github.com/exif-js/exif-js/blob/master/exif.js