Javasc-ordle, making a JS function guessing game with React

Maybe we’re a bit late to the trend, but this week we had fun developing a wordle-esque game for guessing the output of hidden Javascript functions! We’ve deployed it on Codesphere so that you can play it yourself here [https://37929-3000.codesphere.com/] -------------------------------------------------------------------------------- How it works Javasc-ordle(Working title) works by taking a github gist of a function, and blurring out the contents of the function. The player then can gu

June 24, 2022 1 Min Read
Javasc-ordle, making a JS function guessing game with React
Javasc-ordle, making a JS function guessing game with React

Codesphere

From everyone in the Codesphere Team:)

Table of Contents

Maybe we’re a bit late to the trend, but this week we had fun developing a wordle-esque game for guessing the output of hidden Javascript functions!


We’ve deployed it on Codesphere so that you can play it yourself here


How it works

Javasc-ordle(Working title) works by taking a github gist of a function, and blurring out the contents of the function.

The player then can guess different words to release them in the function.

Once the player believes they know how the function works, they can guess the output for the given parameter.


Let’s actually build it!

We built the game with React, you can check out the code here:

As you can see, we start by pulling the gist and creating a version with redacted terms. Then we add functions to allow the player to guess both terms and the output, and perform the correct actions whenever they make a correct guess


Next Steps

Now we could probably do a lot more with this, including:

  • Adding a whole schedule of gists
  • Adding compatibility for multiple languages
  • Score-keeping

But this was a fun way to get started! Let us know if you want us to build this out more!

About the Author

Javasc-ordle, making a JS function guessing game with React

Codesphere

From everyone in the Codesphere Team:)

We are building the next generation of Cloud, combining Infrastructure and IDE in one place, enabling a seamless DevEx and eliminating the need for DevOps specialists.

More Posts

Changelog LTS Version Q3 25

Changelog LTS Version Q3 25

New cli, restricted domains, improved git integration, frontend improvements and more in the latest LTS version.

From Dev Chaos to Cloud Clarity: No More “It Works on My Machine”

From Dev Chaos to Cloud Clarity: No More “It Works on My Machine”

Tired of the “It works on my machine” nightmare? This blog explores how Codesphere eliminates environment drift by letting you develop in production-grade cloud workspaces. so your code runs the same everywhere, from dev to deploy. Build smarter, ship with confidence.

From Friction to Flow — How Codesphere Transforms Productivity

From Friction to Flow — How Codesphere Transforms Productivity

Discover how Codesphere transforms software development by unifying coding, CI/CD, deployment, and infrastructure into one seamless platform. Boost developer productivity, reduce DevOps overhead, and go from idea to live without switching tools or breaking flow.