A game that allows players to experience software development could be an excellent way to weblink teach programming concepts and concepts in coding like loops and conditional statement. Games that allow this include Zachtronics Shenzhen I/O which puts players in the shoes of disaffected engineers who work for an uninteresting chip maker and have to design computer chips by hand. They are provided with increasingly challenging circuits to create, starting with making lights flash in a certain pattern.
The interface in the game looks very similar to web browser’s developer tools and teaches scripting. Screeps is a different excellent example, which combines JavaScript code with massively multiplayer online gaming in order to create self-sustaining colonies. Both games do a wonderful job of teaching the basics while also slowly introducing new ones.