Convert strings in an array to numbers or convert numbers to strings
Scenario
Example: For the '1,2,3' returned by the following interface, the front end needs to be converted into an array.
Each value in the processed array becomes a string, and what I want is [1,2,3]
So I found the following method, which is very convenient to use
1. The method of converting strings in an array to numbers
['1', '2', '3'].map(Number)
2. Convert the numbers into strings in the array
[1, 2, 3].map(String)