Yngvarr

Generation

generate functionFri, 10 Feb 2023

timeout counter

var timeout = function(counter) { if (counter > 0) { setTimeout(function() { console.log(counter); timeout(counter - 1); }, 1000); } }; timeout(5);

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant