i have some problem with jQuery ajax request. when i try to do:
$vertices = getVertices();
console.log(getVertices());
and my function:
function getVertices() {
$.ajax({
method: "GET",
url: "graph/vertices"
}).done(function(data) {
return data;
});
}
I got undefined, and my ask is why do I get undefined ?