For some reason, "p" returns as undefined. How would I make it return the array?
function doT() {
var pe;
$.get("https://www.google.com", function(data) {
pe = ["a", "b", "c"];
});
return pe;
}
var p = doT();
setTimeout(function() { console.log(p.length); }, 1200);