JS
challenger
Home
JavaScript Basics
asynchronous javascript
Execute the code asynchronously
Execute the code asynchronously
Adjust the code snippet so that the value 0 is logged first and then the value 1.
Premium
reset
let count = 0; function increment() { count = count + 1; }
increment(); setTimeout(() => {
console.log(count); }, 1000); console.log(count);
JavaScript
Run Code
Console