I want to convert the following string \'14 2\' into an array of two integers. How can I do it ?
\'14 2\'
An alternative to Tushar Gupta answer would be :
'14 2'.split(' ').map(x=>+x); // [14, 2]`
In code golf you save 1 character. Here the "+" is "unary plus" operator, works like parseInt.