var array = "200,400,300".split(","); var nums = [ ]; for (var i=0 ; i< array.length ; i++) { nums.push(parseInt(array[i])); }