Use Ajax Object

Use Ajax Object

I use a ajax in my js file. I want to use responseText to same js file. My code is :
var colors = $.ajax({
url: "GetSession.php"
});
console.log(colors.responseText);

but it wont work! How I use from response text as a variable in the same js file?