-
-
Save mzkaramat/49266429b719dd74a1b7118f25479021 to your computer and use it in GitHub Desktop.
Make a JavaScript function repeat every x seconds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function refreshData() | |
{ | |
x = 5; // 5 Seconds | |
// Do your thing here | |
setTimeout(refreshData, x*1000); | |
} | |
refreshData(); // execute function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment