Updated AsyncFunction (markdown)

Namhyeon Go 2022-02-25 15:59:39 +09:00
parent 32eab6062b
commit 8e7bc4d4b5

@ -7,9 +7,13 @@ JScript does not support the `async` keyword. So, Wilson JS uses the `AsyncFunct
```js
var STD = require("lib/std");
[5, 4, 3, 2, 1].forEach(function(x) {
new AsyncFunction(function() {
sleep(x * 1000);
}).run();
});
function main(args) {
[5, 4, 3, 2, 1].forEach(function(x) {
new AsyncFunction(function() {
sleep(x * 1000);
}).run();
});
}
exports.main = main;
```