I am getting an array after some manipulation. I need to convert all array values as integers.
My sample code
var result_string = \'
ECMAScript5 provides a map method for Arrays, applying a function to all elements of an array.
Here is an example:
var a = ['1','2','3']
var result = a.map(function (x) {
return parseInt(x, 10);
});
console.log(result);
For more information, check https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map