I have a string that needs to be split and converted into numbers. I decided to split the string and put the strings into an array and later convert them into numbers using the `Array.prototype.every()` function and the `Number()` function. 

When I check the type of the first array element, I see that I still have a string and not a number. Where is my mistake? The answer [here](https://stackoverflow.com/questions/10286386/how-to-convert-string-equation-to-number-in-javascript) makes it look like after splitting JS would convert to number automatically but that isn't happening as evidenced by logging the type of the first element. 

```
function detectOutlierValue(string) {
    // convert string into array with numbers, 'separator " "
    var numArray = string.split(' ');
    console.log(typeof numArray[0]);
    console.log(numArray);

    numArray.every(function (item) {
        return Number(item);
    });
    console.log(numArray, typeof numArray[0]);

```

My output is:

```
string
[ '2', '4', '7', '8', '10' ]
[ '2', '4', '7', '8', '10' ] 'string'

```