One of the first things people learn when they start programming is how to write a text prompt. It’s a decades-old exercise that teaches new programmers input-output.
In order to inject a little excitement, learners are normally
encouraged to write interactive games using standard IO. This helps
them learn programming by interactively - they will need to learn
conditional logic to handle the “Will you stab the monster with your sword or run away?
” prompt.
This creative learning process is great but, unfortunately, it’s hard to show the creations to other people. Any players will have to undergo the nuisance of installing an interpreter, libraries, and the game in order to play. These deployment problems are alleviated on the web: javascript can be distributed and executed remotely in a browser with no effort required from the client.