Skip to main content
3 votes
Accepted

Change the switch code

You can try something like this, saving the names of the functions in a variable, and then accessing the variable with the name of the action, you can also save the reference of the functions of the ...
Rodrigo Juarez's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible