vanilla js game loop code example
Example: vanilla js game loop
function print_hello() {
console.log("Hello!");
// Continue playing the game - aka Recursive trigger motherfucker
setTimeout(print_hello,500)
}
// Trigger aka Start Game
setTimeout(print_hello, 500);