I'm doing some simple functions using javascript, and I need to create an infinite loop that calls the getMessage() function every 5 seconds. Is there an easy method in achieving this? I searched online and I found that this can be done using the settimeout function. Any suggestions on how to use this? Thanks. Here is this code I created till now...
$(document).ready(function () {
getMessage();
});
function getMessage() {
alert("Hello World");
}