Created AsyncFunction (markdown)

Namhyeon Go 2022-02-25 15:58:51 +09:00
parent 261ef1080a
commit 32eab6062b

15
AsyncFunction.md Normal file

@ -0,0 +1,15 @@
## AsyncFunction
JScript does not support the `async` keyword. So, Wilson JS uses the `AsyncFunction` class made by itself.
### Examples
```js
var STD = require("lib/std");
[5, 4, 3, 2, 1].forEach(function(x) {
new AsyncFunction(function() {
sleep(x * 1000);
}).run();
});
```