Highcharts.getJSON('https://demo-live-data.highcharts.com/aapl-c.json', function (data) {
        console.log(typeof(Highcharts.stockChart));
    
});
I want to pass data outside the function,what should I do?
d=Highcharts.getJSON('https://demo-live-data.highcharts.com/aapl-c.json', function (data) {
        console.log(typeof(Highcharts.stockChart));
                return data
    
});
function info2(name,age){
    ls=[name,age];
    this.name=name;
    return ls;
    
}
d=info2('mary',20)
I tried to return the value like normal function,but it doesnt work in the first code.
 
    