const strings = [ "20", "30", "40", "3.14159" ]; const numbers = strings.map(Number); console.log(numbers); // [ 20, 30, 40, 3.14159 ]