A will fail within one year is 1/8 and that of type B will fail is 1/4. If a set fails within a year, what is the probability that tube B was installed in it. code example

Example 1: What will be the result of the cp /etc/hosts . command?

What will be the result of the cp /etc/hosts .   command?

Example 2: create a function that takes in an array of numbers and returns only the number that are even after 1 is added to the value

const evenAfter = (arr) => {
    let i = 0
    let newArr = []
    while (i <= arr.length) {
        if ((arr[i] + 1) % 2 === 0){          
            newArr.push(arr[i])
        }  
        i++
    }
    return newArr
}

console.log(evenAfter([3,6,7,8,9,11]))