I'm struggling to access the currrentPrice variable outside of this API call. How is it done?
var currentPrice
//Get the curent market price
var marketSymobl = checkOrders[i].symbol.split(" - ")[0].toUpperCase()
console.log(checkOrders[i].symbol)
finnhubClient.quote(marketSymobl, (error, data, response) => {
currentPrice = data.c
});
console.log(currentPrice)