What does the function then() mean in JavaScript
<p>I've been seeing code that looks like:</p>

<pre><code>myObj.doSome("task").then(function(env) {
    // logic
});
</code></pre>

<p>Where does then() come from?</p>
