I have a slight problem. I am trying to combine Integers with the length of intergers. For example say player 1 score is 1,000. If the player press the a key I want his score to increase by 100. That is simple to do. But If the player press the “s” key I want his score LENGTH to be doubled with extra ZEROS.
For Example. Player score is 1,000
With the “s” key pressed then released
The player score of 1,000 would be 10,000,000 since 8 is the Length of the 1,000 integer doubled with ZEROS. How can I do this with code? I use javascript.