diff --git a/AsyncFunction.md b/AsyncFunction.md index fca7664..fead05d 100644 --- a/AsyncFunction.md +++ b/AsyncFunction.md @@ -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; ```