I am trying to update value of a variable inside the promise function. What am I doing wrong?
var data="valueoutside";
wb.xlsx.readFile(filePath).then(function(){
data="new value";
}
);
console.log(data);
//shows 'valueoutside' as output and not 'new value'