Hari Krishna Anemharikrishna.hashnode.devยทJan 1, 2022JavaScript: Print 10 numbers with a delay of 3 seconds// Method 1 for (let i =1; i<=5; i++) { setTimeout(function() { console.log(i) }, i * 3000); } // Method 2 for (var i =1; i<=5; i++) { (function foo(i) { setTimeout(function() { console.log(i) }, i * 3000); ...46 readsSetTimeoutAdd a thoughtful commentNo comments yetBe the first to start the conversation.