1. Convert string array to number array
let x1 = ['1','2'];
console.log(x1);
//["1", "2"]
x1 = x1.map(Number);
console.log(x1);
//[1,2]
2. Convert the number array to a string array
let x1 = [1,2];
console.log(x1);
//[1, 2]
x1 = x1.map(String);
console.log(x1);
//['1','2']