JavaScript: Difference between revisions

Line 92: Line 92:
</syntaxhighlight>
</syntaxhighlight>


==Promises==
===Promises===
See [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise Promises]<br>
See [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise Promises]<br>
In general, a function returns a promise if it needs to perform asyncronous tasks.<br>
In general, a function returns a promise if it needs to perform asyncronous tasks.<br>