• + 0 comments

    On `javascript solution {

    let applesInHome = 0; let orangesInHome = 0; let i = 0;

    while (i < apples.length || i < oranges.length) {
        if (i < apples.length && apples[i] + a >= s && apples[i] + a <= t) {
            applesInHome++;
        }
        if (i < oranges.length && oranges[i] + b >= s && oranges[i] + b <= t) {
            orangesInHome++;
        }
        i++; 
    }
    
    console.log(applesInHome);
    console.log(orangesInHome);