What does the function then() mean in JavaScript?

I’ve been seeing code that looks like:

myObj.doSome("task").then(function(env) {
    // logic
});

Where does then() come from?

Leave a Comment