JS Async: 18. Slow
by istiq20
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Slow</title>
</head>
<body>
<button id="buttonTask">Click Me</button>
<script>
function slowLog(total){
for (let i = 0; i < total; i++) {
console.info(i);
}
}
document.getElementById("buttonTask").onclick = function (){
console.info("Start");
slowLog(100000);
console.info("End");
};
</script>
</body>
</html>