Thanks, my 5yo was able to entertain himself with that for an hour straight while I filed taxes :-)
I'll bring it out again later.
I like the legible javascript, feels like a throwback to the days of a simpler internet. :-)
Thanks! I'm glad they enjoyed it!
Writing things in Vanilla JS is a bit of a hobby of mine. Working all day in industrial-strength JS infrastructure with minification, source maps, compilation, and transpilation, it's really nice to just sit down and write something with nothing between me and the browser.
Yup! I have this little ditty that I made many years ago, when I was still learning javascript. I still use it. Then a few years after that I briefly decided that my True Calling was making a JS educational video game about circuit theory, and I got pretty far before deciding to give up and switch to other projects. :)
The kids and I play a typing game. I'll be sitting on the couch with my laptop, and one of them will come over and ask to play. We'll load up jefftk.com/speak:
I'll write something:
Then they'll write something:
Then I'll write something:
It only accepts letters, numbers, and a few punctuation marks. As you type it says the letters, and when you press enter it says your whole sentence. There's a history, but once something scrolls off the bottom of the screen it's gone.
Some ways we'll play with it:
It uses upper-case and sans-serif because that's what the letters on they keyboard look like.
I got the idea from Daniel's version, but rewrote it from scratch to better ignore mistaken inputs. Feel free to copy and modify!