I'm working on a problem where I am given a "coded" message in the form of a string, and have to return the decoded message. This requires me to split a string of mixed characters and numbers into an array. So for example, if I got a string like this:
"0h"
I want to split it into an array like this:
[0, "h"]
But when I use .split I get
["0", "h"]
The solutions I have found only take into account strings that are all numbers, but not mixed strings. Is there a way to convert the strings that are numbers into numbers while retaining the characters?