I would like to re run a the same function after x amount of seconds. the X changes every time the function is ran like the example i have provided below but the code below does not wait half a second before fireing the function again, it just instantly runs the function in an infinite loop
test();
var interval = 500
function test() {
interval = interval + 500;
console.log("1");
setTimeout(test(), interval);
}