Published
- 1 min read
remove quotes from array javascript
The solution for this is noted below
remove quotes from array javascript
Solution
const strings = ['20', '30', '40', '3.14159']
const numbers = strings.map(Number)
console.log(numbers) // [ 20, 30, 40, 3.14159 ]
Try other methods by searching on the site. That is if this doesn’t work