asynchronous code

Run Settings
LanguageJavaScript
Language Version
Run Command
function wait3Seconds(callbackMethod) { setTimeout(function () { console.log('wait 3 seconds'); callbackMethod(4); }, 3000); } function wait(seconds) { setTimeout(function () { console.log('wait ' + seconds + ' seconds'); console.log('end'); }, seconds * 1000); // setTimeout prend un param en milliseconds } console.log('launch'); wait3Seconds(wait); console.log('launched');
Editor Settings
Theme
Key bindings
Full width
Lines