Hello @kartik,
Use split and map function:
var str = "123, 124, 234,252";
var arr = str.split(",");
arr = arr.map(function (val) { return +val + 1; });
Notice +val - string is casted to a number.
Or shorter:
var str = "123, 124, 234,252";
var arr = str.split(",").map(function (val) { return +val + 1; });
Hope it helps!!
Thank you!!