I'm using a a js lib called teemojs to get information from riot API using node.js and want to store what i get in a var to call back to later, this code
api.get('euw1', 'summoner.getBySummonerName', playerName)
.then(data => console.log(data.id))
gives me what I want but I'm not able to store it in a var to access globally any ideas on what i can do
P.S I'm trying to say something like this
api.get('euw1', 'summoner.getBySummonerName', playerName)
.then(data => var Result = (data.id))