var InfoURL
$.get("https://ipinfo.io", function(response) {
    if(response.ip.indexOf(':') > -1) {
        InfoURL = 'google.com';
    } else {
        InfoURL = 'google.ch';  
    } 
    alert(InfoURL);
}, "jsonp");
alert (InfoURL);
So why is the second alert an empty variable? What must I change so that the variable is global?
 
    