I have the next setInterval in JS which emits the test() function only by the time the 5s ends:
let interval = setInterval(() => {
test()
}, 5000)
function test() {
console.log("Test") // will be emitted only in 5s
}
How can I tell the method to run the test() function without waiting?