Let me break it down for you.
Some of the features in this game, are mostly game related. hero.moveRight or hero.attack are not real “commands”. They were programmed by the developers to create a function. However, most of the code in this game can be applied to real life coding.
As a guy who has been coding for close to 3 years, many of the skills your son will pick up such as problem solving and coding syntax are all very important in the development. You will learn for and while loops, object literals, vectors, and how to use variables.
Recently, I helped a friend of mine who was working on creating a website add a new feature into his website, which required me to create a function that can sort out and filter many information.
Thank you for taking the time to read this very long message.
P.S. ~ I assume you are a programmer?