I'm trying to make a function that will repeat itself every x seconds, but I'm not sure it's repeating. My code:
function myfunction() {
if (nonimportant) {
do something;
}
else {
do something else;
}
setTimeout(myfunction(),1000);
}