I want to get the value of an inline function.
let WIDTH;
Image.getSize(imageUri, (width, height) => {
const ratio = height / width;
WIDTH = HEIGHT / ratio;
});
console.log(WIDTH);
The code prints undefined.
I tested this aswell:
let WIDTH = Image.getSize(imageUri, (width, height) => {
const ratio = height / width;
return HEIGHT / ratio;
});
console.log(WIDTH);
And got the same undefined result.