var users = [];
Services.get(value).$loaded().then(function(data){
users.push(data);
// Taken data = [{name:"Jay",age:20}];
console.log(users) // I get users = [{name:"Jay",age:20}]
});
console.log(users);
Hint: The function "Services" is getting it data from a web service.
// But I get an empty (users = []) for the second console.log, I guess the answer should be [{name:"Jay",age:20}] since I have use push in the function.Is it that the push function is not working. PLEASE HELP