I want to know what the difference between promises and a traditional callback is. If they are the same then why do we use promises or if they are not same which is the best approach
using callback functionality
$.get('userDetails', {'name': 'joe'}, function(data) {
$('#userAge').text(data.age);
});
using promises functionality
$http.get('userDetails', {'name': 'joe'})
.then(function(response) {
$('#userAge').text(response.age);
});