Problem - double two triple one

Can anyone give me some hint about this problem ?

My code… What I have tried so far :-

function doubleTwoTripleOne(one, two, three, four) {
    let sum = 0;
    if ((one*2) && (two*2) && (three*3) && (four+4)) {
        
        sum = sum + one + two + three + four;
    }
    console.log(sum);
}

Why do you have an if statement? If for example one will be zero, operation inside if won’t run.

Why did you add an if statement? Can you describe your code in English?

@jenovs

Solved myself :+1:
Thanks.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.