« Back


Whenever.js is a Javascript implementation of the Whenever esolang, designed to play with notions of control flow: How do you write a program when statements are called out of sync?

In Whenever, functions are added to an execution bag and then executed in random order. That’s pretty much it. Functions are removed from the bag on execution unless otherwise directed by in-built functions.

The biggest divergence from the original implementation is that whenever.js uses function declarations instead of statements and refers to them by their name string as opposed to by statement number. This way, we have access to all of the host Javascript’s functionality at a snap, including the ability to declare global variables and access them from various statements.

The ultimate goal for this implementation is to be used as the engine for a text-adventure game.

Fnd out more on Github »