Skip to content

Instantly share code, notes, and snippets.

@RagnowProductions
Created December 5, 2022 22:31
Show Gist options
  • Save RagnowProductions/d3b4d4ddd9fe903e85e0d986e13858a0 to your computer and use it in GitHub Desktop.
Save RagnowProductions/d3b4d4ddd9fe903e85e0d986e13858a0 to your computer and use it in GitHub Desktop.

JavaScript forever loops

This is similar to Scratch's forever loop.

Here's how it works.

function floophappy() - Start of Function
alert("( ◠‿◠ )") - Alerts the ASCII happy face
floophappy() - Calls the function again, going back to step one

/*This is similar to Scratch (scratch.mit.edu)'s Forever loop. It simply just goes forever.*/
function floophappy() {
alert("( ◠‿◠ )");
floophappy();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment