I've been programming in JavaScript for a couple years and never heard the term Promise until recently. I've read multiple articles on the web about it and still don't understand what a Promise is. I don't see any rigorous definition. Every example I've seen is of a problem I've already known how to solve. For example,
get('story.json').then(function(response) {
console.log("Success!", response);
}, function(error) {
console.error("Failed!", error);
});
from https://davidwalsh.name/promises I would've already known how to do like
$.ajax({
url : 'story.json',
method : 'GET',
success : function(response) { console.log("Success!", response); },
error : function(error) { console.error("Failed!", error); }
});
So was I using the concept of a Promise without knowing the term? Or where's the big party that I'm missing out on?