function showWinner(Winner){
if (Winner === "user"){
winner.innerHTML = `You Win!`;
} else if (Winner === "computer") {
winner.innerHTML = `You Lose!`
} else {
winner.innerHTML = `Drawn`;
}
gameTable.style.display = "none";
mainScreen.style.display = "none";
showResult.style.display = "flex";
}
In the above code, I want the function to stop for 2 seconds before changing the styles of the dom elements, how can that be done using pure javascript.