I am trying to update a variable item
with a string in chrome storage to then use it outside the function. Can anyone tell me what i'm doing wrong?
var item;
chrome.storage.sync.get('myLine', function(data) {
item = (data.myLine);
});
alert(item);
Sorry if this is obvious I'm just learning, Thank you.