I have gone through this solution. But this is not solving my problem. Let's say I have a string:
var aString = "0 -1 12 456 -512";
I want to convert this string to an int array like:
var convertedArray = [0, -1, 12, 456, -512];
How should I approach to solve this problem?