|
|
|
|
|
by rorrr
4856 days ago
|
|
> "This is better, it definitely makes it clearer what exactly is going on" function createItem(item, successCallback, errorCallback) {
var req = $.post("/api/item", item);
req.success(successCallback);
req.error(errorCallback);
}
How is this more clear than the default jQuery $.post? |
|
Honestly, I didn't like the examples in the article very much. Not only do they fail to show the major advantages promises have, but he also uses named functions everywhere and that is quite silly.