Currently, I am facing a challenge with my code. I have a variable named "Timer" that I want to increment by one and then display the number. However, I am unable to see the "Test Successful!" message displayed on the screen. Surprisingly, there are no error messages appearing in Visual Studio Code.
function Test() {
var Timer = 4;
setInterval(Rickroll, 1000);
}
function Rickroll() {
if (Timer > 0 ) {
Timer -= 1;
}
var TimerString = Timer.toString();
document.getElementById('p1').innerHTML = "Test Successful! Sending you to another website in: "+TimerString;
}