mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-06-13 00:29:05 +00:00
Updated AsyncFunction (markdown)
parent
32eab6062b
commit
8e7bc4d4b5
|
@ -7,9 +7,13 @@ JScript does not support the `async` keyword. So, Wilson JS uses the `AsyncFunct
|
||||||
```js
|
```js
|
||||||
var STD = require("lib/std");
|
var STD = require("lib/std");
|
||||||
|
|
||||||
[5, 4, 3, 2, 1].forEach(function(x) {
|
function main(args) {
|
||||||
new AsyncFunction(function() {
|
[5, 4, 3, 2, 1].forEach(function(x) {
|
||||||
sleep(x * 1000);
|
new AsyncFunction(function() {
|
||||||
}).run();
|
sleep(x * 1000);
|
||||||
});
|
}).run();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.main = main;
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue
Block a user