Question: The JavaScript filter function not converting the item to integer by using the parseInt. Because of that string concatenation is going on rather than adding the values when used the filtered array in reduce function.

```
    var numbers = ['1', 2, 3, 4,'hello'];

    var intArray=numbers.filter(num => **parseInt(num)**);

    var sum=intArray.reduce((tot, b) => tot+b,0);

```

Answer: 
The trick is to first filter out non int values and then convert all of them to int
filter with isNaN would eliminate hello and map with parseInt will convert strings o number to int

```
var numbers = ['1', 2, 3, 4, 'hello'];
var intArray = numbers
  .filter(num => !isNaN(num)).map(x => parseInt(x))

```
You can also sum them in one `reduce` and skip the `filter` stage where `"1"` gets passed as valid value (which as pointed out already is the issue) etc.

```js
var numbers = ['1', 2, 3, 4,'hello'];
const result = numbers.reduce((r,c) => (+r||0) + (+c||0))
console.log(result)
```