优化这段代码，减少加载时间并简化流程：
```
function processData(data) {
    const newArr = [];
    for (let i = 0; i < data.length; i++) {
        if (data[i].value !== null && data[i].value !== undefined) {
            newArr.push(data[i].value);
        }
    }
    return newArr;
}
```
user
```javascript
function processData(data) {
    return data.filter(item => item.value !== null && item.value !== undefined).map(item => item.value);
}
```
assistant