I have a variable that contains a few comma seperated values. I'd like to split these up and push them into an array as integers only I can't figure it out.
I've the following...
globArr = [];
arr = "1,4,3,2,4,2,4";
var answ = arr.split(',');
globArr.push(parseInt(answ));
console.log(globArr);
https://jsfiddle.net/d7hke7gq/
Can anybody tell me where im going wrong?