I need to convert a string with multiple numbers to an array in jQuery. My string is the one below:
var strVal = "901,235,342,421,345,745,544,324,445,123,232,986,345,678";
You could use String.split with ',' and then Array#map with to Number converted values
var strVal = "901,235,342,421,345,745,544,324,445,123,232,986,345,678",
numbers = strVal.split(',').map(Number);
console.log(numbers);
.as-console-wrapper { max-height: 100% !important; top: 0; }