SyntaxFix
Write A Post
Hire A Developer
Questions
First split the string on spaces:
var result = '14 2'.split(' ');
Then convert the result array of strings into integers:
for (var i in result) { result[i] = parseInt(result[i], 10); }