Jhonatan Rico
Jhonatan Rico

Reputation: 15

VM456:22 Uncaught ReferenceError: wndow is not defined

I am new at javascript, I am trying to make a script to reload a web page after some time but when the time is complete the error shows up and it does not reload the page.

    var url = window.location.href;
console.log("My url: "+url);
console.log("Ten seconds");
setTimeout(function(){reload();}, 10000);

function reload(){
    console.log("Refreshing to... " + url);
    wndow.location.href = url;
}

I do not know what to do :(

Upvotes: 0

Views: 81

Answers (1)

mark_c
mark_c

Reputation: 1212

You have a spelling mistake.

wndow.location.href = url;

Upvotes: 1

Related Questions