I have something that looks like this:
let x = "";
$("#container").croppie('result', {
type: 'canvas',
size: 'original',
format: 'jpeg'
}).then(function (response) {
x = response;
});
console.log(x);
x always returns Promise Pending
. I know a promise is an async process, but is there a way I can make the variable equal to the response?