There was this beautiful website that did something similar: it would type in the code and showing the result on the side. It was mostly creative JS code.
Are you thinking of Processing / P5js ?
Nope, it was a really cool website. It kinda stored every key stroke while you were typing the code then play it back, on the other side of the screen you would see the changes in real time. I've asked ChatGPT but it doesn't remember that either