I'm trying to debug in Chrome's console and have created this small function for testing.
var hello = function(){
var text = "Hello World";
return text;
};
It works as I want it to, and when I call the function hello(); It returns the string "Hello World".
Now I'm not getting the same with this function using the Soundcloud API resolve endpoint.
var idGetter = function(){
SC.get('/resolve', { url: userURL }, function(user) {
SC.get('/users/', function() {
return (user.id);
});
});
};
When I replace the return with console.log I get the value I'm looking for in the console so I know it's getting the data out, but when I use return I'm not able to call a value as I did in the "Hello World" function above.
Can add more code if it helps.